fix TS errors
This commit is contained in:
committed by
Nicolò Ribaudo
parent
351f1585b7
commit
2fc8ad9539
@@ -38,7 +38,7 @@ interface Options {
|
||||
name: string;
|
||||
feature: number;
|
||||
loose?: boolean;
|
||||
inherits?: () => Options;
|
||||
inherits?: (api: any, options: any) => any;
|
||||
// same as PluginObject.manipulateOptions
|
||||
manipulateOptions: (options: unknown, parserOpts: ParserOptions) => void;
|
||||
// TODO(flow->ts): change to babel api
|
||||
@@ -52,6 +52,7 @@ export function createClassFeaturePlugin({
|
||||
manipulateOptions,
|
||||
// TODO(Babel 8): Remove the default value
|
||||
api = { assumption: () => void 0 },
|
||||
inherits,
|
||||
}: Options) {
|
||||
const setPublicClassFields = api.assumption("setPublicClassFields");
|
||||
const privateFieldsAsProperties = api.assumption("privateFieldsAsProperties");
|
||||
@@ -86,6 +87,7 @@ export function createClassFeaturePlugin({
|
||||
return {
|
||||
name,
|
||||
manipulateOptions,
|
||||
inherits,
|
||||
|
||||
pre() {
|
||||
enableFeature(this.file, feature, loose);
|
||||
|
||||
Reference in New Issue
Block a user