refactor: move @babel/helper-validator-option to ts (#12410)
This commit is contained in:
@@ -133,3 +133,27 @@ declare module "@babel/helper-validator-identifier" {
|
||||
declare function isIdentifierChar(code: number): boolean;
|
||||
declare function isIdentifierName(name: string): boolean;
|
||||
}
|
||||
|
||||
declare module "@babel/helper-validator-option" {
|
||||
declare class OptionValidator {
|
||||
descriptor: string;
|
||||
constructor(descriptor: string): OptionValidator;
|
||||
validateTopLevelOptions(options: Object, TopLevelOptionShape: Object): void;
|
||||
validateBooleanOption<T>(
|
||||
name: string,
|
||||
value?: boolean,
|
||||
defaultValue?: T
|
||||
): boolean | T;
|
||||
validateStringOption<T>(
|
||||
name: string,
|
||||
value?: string,
|
||||
defaultValue?: T
|
||||
): string | T;
|
||||
invariant(condition: boolean, message: string): void;
|
||||
formatMessage(message: string): string;
|
||||
}
|
||||
declare function findSuggestion(
|
||||
str: string,
|
||||
arr: $ReadonlyArray<string>
|
||||
): string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user