From 351f1585b7fbf89bfe3f0ca3e926cf0bb5a05b0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hu=C3=A1ng=20J=C3=B9nli=C3=A0ng?= Date: Fri, 14 Jan 2022 20:41:36 -0500 Subject: [PATCH] fix test errors --- packages/babel-helper-create-class-features-plugin/src/index.ts | 1 + packages/babel-plugin-syntax-decorators/src/index.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/babel-helper-create-class-features-plugin/src/index.ts b/packages/babel-helper-create-class-features-plugin/src/index.ts index 70da4597d0..25105ca085 100644 --- a/packages/babel-helper-create-class-features-plugin/src/index.ts +++ b/packages/babel-helper-create-class-features-plugin/src/index.ts @@ -38,6 +38,7 @@ interface Options { name: string; feature: number; loose?: boolean; + inherits?: () => Options; // same as PluginObject.manipulateOptions manipulateOptions: (options: unknown, parserOpts: ParserOptions) => void; // TODO(flow->ts): change to babel api diff --git a/packages/babel-plugin-syntax-decorators/src/index.ts b/packages/babel-plugin-syntax-decorators/src/index.ts index b0d65e4972..ccfbeedaa7 100644 --- a/packages/babel-plugin-syntax-decorators/src/index.ts +++ b/packages/babel-plugin-syntax-decorators/src/index.ts @@ -13,7 +13,7 @@ export default declare((api, options) => { ) { throw new Error("Unsupported decorators version: " + version); } - if (version !== undefined && options.legacy !== undefined) { + if (options.version !== undefined && options.legacy !== undefined) { throw new Error( 'You can either specify `legacy: true` or `version: "legacy"` with decorators, not both.', );