From da403032d903b85a50cecb86e3dd1aba062f6ef6 Mon Sep 17 00:00:00 2001 From: Ricardo Gobbo de Souza Date: Fri, 20 May 2022 10:41:38 -0300 Subject: [PATCH] fix: types (#274) --- src/getStylelint.js | 2 +- types/getStylelint.d.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/getStylelint.js b/src/getStylelint.js index ae06120..e60be72 100644 --- a/src/getStylelint.js +++ b/src/getStylelint.js @@ -16,7 +16,7 @@ const cache = {}; /** @typedef {() => Promise} AsyncTask */ /** @typedef {(files: string|string[]) => Promise} 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 diff --git a/types/getStylelint.d.ts b/types/getStylelint.d.ts index 0f18e13..8b69074 100644 --- a/types/getStylelint.d.ts +++ b/types/getStylelint.d.ts @@ -86,6 +86,7 @@ type Stylelint = import('postcss').PluginCreator< type LintResult = import('stylelint').LintResult; type AsyncTask = () => Promise; type LintTask = (files: string | string[]) => Promise; -type Worker = import('jest-worker').Worker & { +type Worker = JestWorker & { lintFiles: LintTask; }; +import { Worker as JestWorker } from 'jest-worker';