Skip to content

Commit

Permalink
chore: add flow interface
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Dec 1, 2020
1 parent 6cbbe7f commit 12473ca
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions lib/babel-packages.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,27 @@ declare module "@babel/template" {
program: Program,
};
}

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;
}

0 comments on commit 12473ca

Please sign in to comment.