Skip to content

Commit

Permalink
fix: remove promise from typings
Browse files Browse the repository at this point in the history
  • Loading branch information
timofei-iatsenko committed Oct 2, 2024
1 parent e19ee21 commit 295a9d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/babel-core/src/config/validation/plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ export type PluginObject<S extends PluginPass = PluginPass> = {
options: ValidatedOptions,
parserOpts: ParserOptions,
) => void;
pre?: (this: S, file: File) => void | Promise<void>;
post?: (this: S, file: File) => void | Promise<void>;
pre?: (this: S, file: File) => void;
post?: (this: S, file: File) => void;
inherits?: (
api: PluginAPI,
options: unknown,
Expand Down
2 changes: 0 additions & 2 deletions packages/babel-core/src/transformation/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ function* transformFile(file: File, pluginPasses: PluginPasses): Handler<void> {
`You appear to be using an async plugin/preset, but Babel has been called synchronously`,
);

// eslint-disable-next-line @typescript-eslint/no-floating-promises
yield* fn.call(pass, file);
}
}
Expand All @@ -124,7 +123,6 @@ function* transformFile(file: File, pluginPasses: PluginPasses): Handler<void> {
`You appear to be using an async plugin/preset, but Babel has been called synchronously`,
);

// eslint-disable-next-line @typescript-eslint/no-floating-promises
yield* fn.call(pass, file);
}
}
Expand Down

0 comments on commit 295a9d7

Please sign in to comment.