refactor: move @babel/helper-validator-identifier to ts (#12409)

* refactor: rename helper-validator-identifier to ts

* fix flow errors
This commit is contained in:
Huáng Jùnliàng
2020-12-11 17:41:56 -05:00
committed by GitHub
parent a46cd643ab
commit fc82169b4e
6 changed files with 21 additions and 10 deletions

View File

@@ -116,3 +116,20 @@ declare module "@babel/code-frame" {
opts?: Options
): string;
}
declare module "@babel/helper-validator-identifier" {
declare function isReservedWord(word: string, inModule: boolean): boolean;
declare function isStrictReservedWord(
word: string,
inModule: boolean
): boolean;
declare function isStrictBindOnlyReservedWord(word: string): boolean;
declare function isStrictBindReservedWord(
word: string,
inModule: boolean
): boolean;
declare function isKeyword(word: string): boolean;
declare function isIdentifierStart(code: number): boolean;
declare function isIdentifierChar(code: number): boolean;
declare function isIdentifierName(name: string): boolean;
}