diff --git a/packages/babel-parser/typings/babel-parser.d.ts b/packages/babel-parser/typings/babel-parser.d.ts index aedf2c5714bb..4281f0caf536 100644 --- a/packages/babel-parser/typings/babel-parser.d.ts +++ b/packages/babel-parser/typings/babel-parser.d.ts @@ -206,6 +206,8 @@ interface ParserOptions { createParenthesizedExpressions?: boolean; } +type ParserPlugin = PluginConfig; + declare const tokTypes: { // todo(flow->ts) real token type @@ -221,4 +223,4 @@ type ParseResult = Result & { errors: ParseError[]; }; -export { DecoratorsPluginOptions, FlowPluginOptions, ParseError, ParserOptions, PluginConfig as ParserPlugin, ParserPluginWithOptions, PipelineOperatorPluginOptions, RecordAndTuplePluginOptions, TypeScriptPluginOptions, parse, parseExpression, tokTypes }; +export { DecoratorsPluginOptions, FlowPluginOptions, ParseError, ParserOptions, ParserPlugin, ParserPluginWithOptions, PipelineOperatorPluginOptions, RecordAndTuplePluginOptions, TypeScriptPluginOptions, parse, parseExpression, tokTypes }; diff --git a/packages/babel-parser/typings/babel-parser.source.d.ts b/packages/babel-parser/typings/babel-parser.source.d.ts index 025d77661306..0bcbefe602ab 100644 --- a/packages/babel-parser/typings/babel-parser.source.d.ts +++ b/packages/babel-parser/typings/babel-parser.source.d.ts @@ -125,8 +125,9 @@ export interface ParserOptions { createParenthesizedExpressions?: boolean; } +export type ParserPlugin = import("../src/typings").PluginConfig; + export type { - PluginConfig as ParserPlugin, ParserPluginWithOptions, DecoratorsPluginOptions, PipelineOperatorPluginOptions,