pull/1106/head
Rich Harris 8 years ago
parent 1833bc194f
commit 66b64e254d

@ -1,6 +1,6 @@
import { isIdentifierStart, isIdentifierChar } from 'acorn';
export default function isValidIdentifier(str) {
export default function isValidIdentifier(str: string): boolean {
if (!isIdentifierStart(str.charCodeAt(0), true)) return false;
for (let i = 0; i < str.length; i += 1) {

Loading…
Cancel
Save