Add TypeScript definitions for parser plugin options. (#9457)
This commit is contained in:
parent
d896ce2b53
commit
e03e5ba01d
20
packages/babel-parser/typings/babel-parser.d.ts
vendored
20
packages/babel-parser/typings/babel-parser.d.ts
vendored
@ -106,4 +106,22 @@ export type ParserPlugin =
|
||||
'optionalCatchBinding' |
|
||||
'throwExpressions' |
|
||||
'pipelineOperator' |
|
||||
'nullishCoalescingOperator';
|
||||
'nullishCoalescingOperator' |
|
||||
ParserPluginWithOptions;
|
||||
|
||||
export type ParserPluginWithOptions =
|
||||
['decorators', DecoratorsPluginOptions] |
|
||||
['pipelineOperator', PipelineOperatorPluginOptions] |
|
||||
['flow', FlowPluginOptions];
|
||||
|
||||
export interface DecoratorsPluginOptions {
|
||||
decoratorsBeforeExport?: boolean;
|
||||
}
|
||||
|
||||
export interface PipelineOperatorPluginOptions {
|
||||
proposal: 'minimal' | 'smart';
|
||||
}
|
||||
|
||||
export interface FlowPluginOptions {
|
||||
all?: boolean;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user