sucrase
Version:
Super-fast alternative to Babel for when you can target modern JS runtimes
9 lines (8 loc) • 306 B
TypeScript
/**
* Determine if the given name is a legal variable name.
*
* This is needed when transforming TypeScript enums; if an enum key is a valid
* variable name, it might be referenced later in the enum, so we need to
* declare a variable.
*/
export default function isIdentifier(name: string): boolean;