Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion apps/oxlint/src-js/plugins/fix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const { prototype: ArrayPrototype, from: ArrayFrom } = Array,
// Type of `fix` function.
// `fix` can return a single fix, an array of fixes, or any iterator that yields fixes.
// e.g. `(function*() { yield fix1; yield fix2; })()`
export type FixFn = (fixer: typeof FIXER) => Fix | Array<Fix | null> | IterableIterator<Fix | null> | null;
export type FixFn = (fixer: Fixer) => Fix | Array<Fix | null> | IterableIterator<Fix | null> | null;

// Type of a fix, as returned by `fix` function.
export type Fix = { range: Range; text: string };
Expand Down Expand Up @@ -58,6 +58,8 @@ const FIXER = Object.freeze({
},
});

type Fixer = typeof FIXER;

/**
* Get fixes from a `Diagnostic`.
*
Expand Down
Loading