Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve plugins typings (Part 3) #14642

Merged
merged 17 commits into from Jun 18, 2022
2 changes: 1 addition & 1 deletion packages/babel-helper-fixtures/src/index.ts
Expand Up @@ -45,7 +45,7 @@ export interface Test {
validateLogs: boolean;
}

interface TaskOptions extends InputOptions {
export interface TaskOptions extends InputOptions {
BABEL_8_BREAKING?: boolean;
DO_NOT_SET_SOURCE_TYPE?: boolean;
externalHelpers?: boolean;
Expand Down
12 changes: 9 additions & 3 deletions packages/babel-helper-transform-fixture-test-runner/src/index.ts
Expand Up @@ -10,6 +10,7 @@ import {
resolveOptionPluginOrPreset,
type Test,
type TestFile,
type TaskOptions,
} from "@babel/helper-fixtures";
import { codeFrameColumns } from "@babel/code-frame";
import { TraceMap, originalPositionFor } from "@jridgewell/trace-mapping";
Expand Down Expand Up @@ -464,12 +465,17 @@ declare global {
}
}

export type SuiteOptions = {
ignoreSuites?: string[];
ignoreTasks?: string[];
};

export default function (
fixturesLoc: string,
name: string,
suiteOpts: any = {},
taskOpts: any = {},
dynamicOpts?: Function,
suiteOpts: SuiteOptions = {},
taskOpts: TaskOptions = {},
dynamicOpts?: (options: TaskOptions, task: Test) => void,
Comment on lines +476 to +478
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These options are not used in our codebase, maybe we can remove them in Babel 8.

) {
const suites = getFixtures(fixturesLoc);

Expand Down