diff --git a/package.json b/package.json index 7e6a2fd1..7d359e43 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "remark-preset-wooorm": "^10.0.0", "tsd": "^0.31.0", "type-coverage": "^2.0.0", - "typescript": "~5.4.0", + "typescript": "^5.0.0", "xo": "^0.58.0" }, "scripts": { diff --git a/script/fix-types.js b/script/fix-types.js index 905cfe8f..0140555d 100644 --- a/script/fix-types.js +++ b/script/fix-types.js @@ -29,11 +29,23 @@ const result = file */ function ($0, $1) { console.log( - 'Fixed `use` overload with plugin, and *non-optional* parameters' + 'Fixed `use` overload with plugin, and *non-optional* parameters (TS pre 5.4)' ) return '...parameters: ' + $1 + ' | [boolean]' } ) + .replace( + /\.\.\.parameters: \(Parameters \| \[boolean]\)\[]/, + /** + * @returns {string} + */ + function () { + console.log( + 'Fixed `use` overload with plugin, and *non-optional* parameters (TS 5.5+)' + ) + return '...parameters: Parameters | [boolean]' + } + ) if (file === result) { console.error(