diff --git a/index.js b/index.js index 4db5dc6..d5a2f53 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,7 @@ // @ts-check /** - * @typedef {import('fs').Stats} Stats + * @import { Stats } from 'node:fs' */ 'use strict' @@ -105,7 +105,9 @@ async function * asyncFolderWalker (dirs, opts) { // @ts-ignore const ig = ignore().add(resolvedOpts.ignore) + /** @type {string[]} */ const roots = [dirs].flat().filter(resolvedOpts.pathFilter) + /** @type {string[]} */ const pending = [] while (roots.length) { diff --git a/package.json b/package.json index 001e589..f50650e 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "p-temporary-directory": "^2.0.1", "standard": "^17.0.0", "tap": "^21.1.1", - "typescript": "~5.9.3" + "typescript": "~6.0.3" }, "peerDependencies": { "@types/node": "*" diff --git a/tsconfig.json b/tsconfig.json index af8db74..26036ef 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,6 +3,7 @@ "compilerOptions": { "allowJs": true, "checkJs": true, + "types": ["node"], "noEmit": true, "resolveJsonModule": true, "skipLibCheck": false,