From 22b2f4fc0233ece9e9dcf26f219ee13492311d68 Mon Sep 17 00:00:00 2001 From: Sosuke Suzuki Date: Tue, 20 Jul 2021 23:44:13 +0900 Subject: [PATCH] Update babel-parser.d.ts (#13575) * Add moduleBlocks to ParserPlugin type * Add TypeScriptPluginOptions to ParserPluginWithOptions --- packages/babel-parser/typings/babel-parser.d.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/babel-parser/typings/babel-parser.d.ts b/packages/babel-parser/typings/babel-parser.d.ts index 109dfd3dae63..edc3a1041741 100644 --- a/packages/babel-parser/typings/babel-parser.d.ts +++ b/packages/babel-parser/typings/babel-parser.d.ts @@ -131,6 +131,7 @@ export type ParserPlugin = | "jsx" | "logicalAssignment" | "importAssertions" + | "moduleBlocks" | "moduleStringNames" | "nullishCoalescingOperator" | "numericSeparator" @@ -151,7 +152,8 @@ export type ParserPluginWithOptions = | ["decorators", DecoratorsPluginOptions] | ["pipelineOperator", PipelineOperatorPluginOptions] | ["recordAndTuple", RecordAndTuplePluginOptions] - | ["flow", FlowPluginOptions]; + | ["flow", FlowPluginOptions] + | ["typescript", TypeScriptPluginOptions]; export interface DecoratorsPluginOptions { decoratorsBeforeExport?: boolean; @@ -169,6 +171,10 @@ export interface FlowPluginOptions { all?: boolean; } +export interface TypeScriptPluginOptions { + dts?: boolean; +} + export const tokTypes: { // todo(flow->ts) real token type [name: string]: any;