Skip to content

Commit

Permalink
fix: types (#274)
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardogobbosouza authored May 20, 2022
1 parent c855e23 commit da40303
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/getStylelint.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const cache = {};
/** @typedef {() => Promise<void>} AsyncTask */
/** @typedef {(files: string|string[]) => Promise<LintResult[]>} LintTask */
/** @typedef {{api: import('stylelint').InternalApi, stylelint: Stylelint, lintFiles: LintTask, cleanup: AsyncTask, threads: number, }} Linter */
/** @typedef {import('jest-worker').Worker & {lintFiles: LintTask}} Worker */
/** @typedef {JestWorker & {lintFiles: LintTask}} Worker */

/**
* @param {Options} options
Expand Down
3 changes: 2 additions & 1 deletion types/getStylelint.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ type Stylelint = import('postcss').PluginCreator<
type LintResult = import('stylelint').LintResult;
type AsyncTask = () => Promise<void>;
type LintTask = (files: string | string[]) => Promise<LintResult[]>;
type Worker = import('jest-worker').Worker & {
type Worker = JestWorker & {
lintFiles: LintTask;
};
import { Worker as JestWorker } from 'jest-worker';

0 comments on commit da40303

Please sign in to comment.