Merge pull request #931 from Maks1mS/fix-typescript-4-5

Fix Typescript ^4.5 build
This commit is contained in:
Alexander Bukhalo 2022-09-08 10:20:34 +03:00 committed by GitHub
commit 3706bb0033
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 54 additions and 105 deletions

View File

@ -9,10 +9,12 @@ export type Filter<T extends any[], F> = T extends []
: []; : [];
export type OnlyFunctionPropertyNames<T> = { export type OnlyFunctionPropertyNames<T> = {
[K in keyof T]: T[K] extends (...args: any) => any ? K : never; [K in keyof T]: T[K] extends (...args: any[]) => any ? K : never;
}[keyof T]; }[keyof T];
type ParametersOrNever<T> = T extends (...args: any[]) => any ? Parameters<T> : never;
export type ComposerMethodArgs< export type ComposerMethodArgs<
T extends Composer<never>, T extends Composer<never>,
U extends OnlyFunctionPropertyNames<T> = OnlyFunctionPropertyNames<T>, U extends OnlyFunctionPropertyNames<T> = OnlyFunctionPropertyNames<T>,
> = Filter<Parameters<T[U]>, Middleware<never>>; > = Filter<ParametersOrNever<T[U]>, Middleware<never>>;

147
package-lock.json generated
View File

@ -27,8 +27,8 @@
"prettier": "2.7.1", "prettier": "2.7.1",
"reflect-metadata": "0.1.13", "reflect-metadata": "0.1.13",
"telegraf": "4.8.6", "telegraf": "4.8.6",
"typedoc": "0.22.18", "typedoc": "0.23.11",
"typescript": "4.4.4" "typescript": "4.8.2"
}, },
"funding": { "funding": {
"url": "https://hypeer.company/donate" "url": "https://hypeer.company/donate"
@ -38,7 +38,7 @@
"@nestjs/core": "^8.0.0 || ^9.0.0", "@nestjs/core": "^8.0.0 || ^9.0.0",
"reflect-metadata": "^0.1.13", "reflect-metadata": "^0.1.13",
"telegraf": "^4.0.0", "telegraf": "^4.0.0",
"typescript": "<=4.4.4" "typescript": "^4.4.4"
} }
}, },
"node_modules/@babel/code-frame": { "node_modules/@babel/code-frame": {
@ -321,19 +321,6 @@
"node": ">=8" "node": ">=8"
} }
}, },
"node_modules/@commitlint/load/node_modules/typescript": {
"version": "4.7.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz",
"integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==",
"dev": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
},
"engines": {
"node": ">=4.2.0"
}
},
"node_modules/@commitlint/message": { "node_modules/@commitlint/message": {
"version": "17.0.0", "version": "17.0.0",
"resolved": "https://registry.npmjs.org/@commitlint/message/-/message-17.0.0.tgz", "resolved": "https://registry.npmjs.org/@commitlint/message/-/message-17.0.0.tgz",
@ -2388,9 +2375,9 @@
"dev": true "dev": true
}, },
"node_modules/jsonc-parser": { "node_modules/jsonc-parser": {
"version": "3.0.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.0.0.tgz", "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.1.0.tgz",
"integrity": "sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA==", "integrity": "sha512-DRf0QjnNeCUds3xTjKlQQ3DpJD51GvDjJfnxUVWg6PZTo2otSm+slzNAxU/35hF8/oJIKoG9slq30JYOsF2azg==",
"dev": true "dev": true
}, },
"node_modules/jsonfile": { "node_modules/jsonfile": {
@ -2861,9 +2848,9 @@
} }
}, },
"node_modules/marked": { "node_modules/marked": {
"version": "4.0.16", "version": "4.0.19",
"resolved": "https://registry.npmjs.org/marked/-/marked-4.0.16.tgz", "resolved": "https://registry.npmjs.org/marked/-/marked-4.0.19.tgz",
"integrity": "sha512-wahonIQ5Jnyatt2fn8KqF/nIqZM8mh3oRu2+l5EANGMhu6RFjiSG52QNE2eWzFMI94HqYSgN184NurgNG6CztA==", "integrity": "sha512-rgQF/OxOiLcvgUAj1Q1tAf4Bgxn5h5JZTp04Fx4XUkVhs7B+7YA9JEWJhJpoO8eJt8MkZMwqLCNeNqj1bCREZQ==",
"dev": true, "dev": true,
"bin": { "bin": {
"marked": "bin/marked.js" "marked": "bin/marked.js"
@ -3738,14 +3725,14 @@
} }
}, },
"node_modules/shiki": { "node_modules/shiki": {
"version": "0.10.1", "version": "0.11.1",
"resolved": "https://registry.npmjs.org/shiki/-/shiki-0.10.1.tgz", "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.11.1.tgz",
"integrity": "sha512-VsY7QJVzU51j5o1+DguUd+6vmCmZ5v/6gYu4vyYAhzjuNQU6P/vmSy4uQaOhvje031qQMiW0d2BwgMH52vqMng==", "integrity": "sha512-EugY9VASFuDqOexOgXR18ZV+TbFrQHeCpEYaXamO+SZlsnT/2LxuLBX25GGtIrwaEVFXUAbUQ601SWE2rMwWHA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"jsonc-parser": "^3.0.0", "jsonc-parser": "^3.0.0",
"vscode-oniguruma": "^1.6.1", "vscode-oniguruma": "^1.6.1",
"vscode-textmate": "5.2.0" "vscode-textmate": "^6.0.0"
} }
}, },
"node_modules/signal-exit": { "node_modules/signal-exit": {
@ -4088,25 +4075,24 @@
} }
}, },
"node_modules/typedoc": { "node_modules/typedoc": {
"version": "0.22.18", "version": "0.23.11",
"resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.22.18.tgz", "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.23.11.tgz",
"integrity": "sha512-NK9RlLhRUGMvc6Rw5USEYgT4DVAUFk7IF7Q6MYfpJ88KnTZP7EneEa4RcP+tX1auAcz7QT1Iy0bUSZBYYHdoyA==", "integrity": "sha512-FhZ2HfqlS++53UwHk4txCsTrTlpYR0So/0osMyBeP1E7llRNRqycJGfYK1qx9Wvvv5VO8tGdpwzOwDW5FrTi7A==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"glob": "^8.0.3",
"lunr": "^2.3.9", "lunr": "^2.3.9",
"marked": "^4.0.16", "marked": "^4.0.19",
"minimatch": "^5.1.0", "minimatch": "^5.1.0",
"shiki": "^0.10.1" "shiki": "^0.11.1"
}, },
"bin": { "bin": {
"typedoc": "bin/typedoc" "typedoc": "bin/typedoc"
}, },
"engines": { "engines": {
"node": ">= 12.10.0" "node": ">= 14.14"
}, },
"peerDependencies": { "peerDependencies": {
"typescript": "4.0.x || 4.1.x || 4.2.x || 4.3.x || 4.4.x || 4.5.x || 4.6.x || 4.7.x" "typescript": "4.6.x || 4.7.x || 4.8.x"
} }
}, },
"node_modules/typedoc/node_modules/brace-expansion": { "node_modules/typedoc/node_modules/brace-expansion": {
@ -4118,25 +4104,6 @@
"balanced-match": "^1.0.0" "balanced-match": "^1.0.0"
} }
}, },
"node_modules/typedoc/node_modules/glob": {
"version": "8.0.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz",
"integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==",
"dev": true,
"dependencies": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^5.0.1",
"once": "^1.3.0"
},
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/typedoc/node_modules/minimatch": { "node_modules/typedoc/node_modules/minimatch": {
"version": "5.1.0", "version": "5.1.0",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz",
@ -4156,9 +4123,9 @@
"dev": true "dev": true
}, },
"node_modules/typescript": { "node_modules/typescript": {
"version": "4.4.4", "version": "4.8.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.4.tgz", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.2.tgz",
"integrity": "sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA==", "integrity": "sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==",
"dev": true, "dev": true,
"bin": { "bin": {
"tsc": "bin/tsc", "tsc": "bin/tsc",
@ -4230,9 +4197,9 @@
"dev": true "dev": true
}, },
"node_modules/vscode-textmate": { "node_modules/vscode-textmate": {
"version": "5.2.0", "version": "6.0.0",
"resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-5.2.0.tgz", "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-6.0.0.tgz",
"integrity": "sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ==", "integrity": "sha512-gu73tuZfJgu+mvCSy4UZwd2JXykjK9zAZsfmDeut5dx/1a7FeTk0XwJsSuqQn+cuMCGVbIBfl+s53X4T19DnzQ==",
"dev": true "dev": true
}, },
"node_modules/webidl-conversions": { "node_modules/webidl-conversions": {
@ -4593,12 +4560,6 @@
"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",
"integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
"dev": true "dev": true
},
"typescript": {
"version": "4.7.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz",
"integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==",
"dev": true
} }
} }
}, },
@ -6102,9 +6063,9 @@
"dev": true "dev": true
}, },
"jsonc-parser": { "jsonc-parser": {
"version": "3.0.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.0.0.tgz", "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.1.0.tgz",
"integrity": "sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA==", "integrity": "sha512-DRf0QjnNeCUds3xTjKlQQ3DpJD51GvDjJfnxUVWg6PZTo2otSm+slzNAxU/35hF8/oJIKoG9slq30JYOsF2azg==",
"dev": true "dev": true
}, },
"jsonfile": { "jsonfile": {
@ -6419,9 +6380,9 @@
"dev": true "dev": true
}, },
"marked": { "marked": {
"version": "4.0.16", "version": "4.0.19",
"resolved": "https://registry.npmjs.org/marked/-/marked-4.0.16.tgz", "resolved": "https://registry.npmjs.org/marked/-/marked-4.0.19.tgz",
"integrity": "sha512-wahonIQ5Jnyatt2fn8KqF/nIqZM8mh3oRu2+l5EANGMhu6RFjiSG52QNE2eWzFMI94HqYSgN184NurgNG6CztA==", "integrity": "sha512-rgQF/OxOiLcvgUAj1Q1tAf4Bgxn5h5JZTp04Fx4XUkVhs7B+7YA9JEWJhJpoO8eJt8MkZMwqLCNeNqj1bCREZQ==",
"dev": true "dev": true
}, },
"meow": { "meow": {
@ -7022,14 +6983,14 @@
"dev": true "dev": true
}, },
"shiki": { "shiki": {
"version": "0.10.1", "version": "0.11.1",
"resolved": "https://registry.npmjs.org/shiki/-/shiki-0.10.1.tgz", "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.11.1.tgz",
"integrity": "sha512-VsY7QJVzU51j5o1+DguUd+6vmCmZ5v/6gYu4vyYAhzjuNQU6P/vmSy4uQaOhvje031qQMiW0d2BwgMH52vqMng==", "integrity": "sha512-EugY9VASFuDqOexOgXR18ZV+TbFrQHeCpEYaXamO+SZlsnT/2LxuLBX25GGtIrwaEVFXUAbUQ601SWE2rMwWHA==",
"dev": true, "dev": true,
"requires": { "requires": {
"jsonc-parser": "^3.0.0", "jsonc-parser": "^3.0.0",
"vscode-oniguruma": "^1.6.1", "vscode-oniguruma": "^1.6.1",
"vscode-textmate": "5.2.0" "vscode-textmate": "^6.0.0"
} }
}, },
"signal-exit": { "signal-exit": {
@ -7284,16 +7245,15 @@
"dev": true "dev": true
}, },
"typedoc": { "typedoc": {
"version": "0.22.18", "version": "0.23.11",
"resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.22.18.tgz", "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.23.11.tgz",
"integrity": "sha512-NK9RlLhRUGMvc6Rw5USEYgT4DVAUFk7IF7Q6MYfpJ88KnTZP7EneEa4RcP+tX1auAcz7QT1Iy0bUSZBYYHdoyA==", "integrity": "sha512-FhZ2HfqlS++53UwHk4txCsTrTlpYR0So/0osMyBeP1E7llRNRqycJGfYK1qx9Wvvv5VO8tGdpwzOwDW5FrTi7A==",
"dev": true, "dev": true,
"requires": { "requires": {
"glob": "^8.0.3",
"lunr": "^2.3.9", "lunr": "^2.3.9",
"marked": "^4.0.16", "marked": "^4.0.19",
"minimatch": "^5.1.0", "minimatch": "^5.1.0",
"shiki": "^0.10.1" "shiki": "^0.11.1"
}, },
"dependencies": { "dependencies": {
"brace-expansion": { "brace-expansion": {
@ -7305,19 +7265,6 @@
"balanced-match": "^1.0.0" "balanced-match": "^1.0.0"
} }
}, },
"glob": {
"version": "8.0.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz",
"integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^5.0.1",
"once": "^1.3.0"
}
},
"minimatch": { "minimatch": {
"version": "5.1.0", "version": "5.1.0",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz",
@ -7336,9 +7283,9 @@
"dev": true "dev": true
}, },
"typescript": { "typescript": {
"version": "4.4.4", "version": "4.8.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.4.tgz", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.2.tgz",
"integrity": "sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA==", "integrity": "sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==",
"dev": true "dev": true
}, },
"universalify": { "universalify": {
@ -7397,9 +7344,9 @@
"dev": true "dev": true
}, },
"vscode-textmate": { "vscode-textmate": {
"version": "5.2.0", "version": "6.0.0",
"resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-5.2.0.tgz", "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-6.0.0.tgz",
"integrity": "sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ==", "integrity": "sha512-gu73tuZfJgu+mvCSy4UZwd2JXykjK9zAZsfmDeut5dx/1a7FeTk0XwJsSuqQn+cuMCGVbIBfl+s53X4T19DnzQ==",
"dev": true "dev": true
}, },
"webidl-conversions": { "webidl-conversions": {

View File

@ -68,14 +68,14 @@
"prettier": "2.7.1", "prettier": "2.7.1",
"reflect-metadata": "0.1.13", "reflect-metadata": "0.1.13",
"telegraf": "4.8.6", "telegraf": "4.8.6",
"typedoc": "0.22.18", "typedoc": "0.23.11",
"typescript": "4.4.4" "typescript": "4.8.2"
}, },
"peerDependencies": { "peerDependencies": {
"@nestjs/common": "^8.0.0 || ^9.0.0", "@nestjs/common": "^8.0.0 || ^9.0.0",
"@nestjs/core": "^8.0.0 || ^9.0.0", "@nestjs/core": "^8.0.0 || ^9.0.0",
"reflect-metadata": "^0.1.13", "reflect-metadata": "^0.1.13",
"telegraf": "^4.0.0", "telegraf": "^4.0.0",
"typescript": "<=4.4.4" "typescript": "^4.1.2"
} }
} }