diff --git a/definitelyTypedTests/package-lock.json b/definitelyTypedTests/package-lock.json index 91fd186e8..623c5ea5c 100644 --- a/definitelyTypedTests/package-lock.json +++ b/definitelyTypedTests/package-lock.json @@ -865,11 +865,24 @@ "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=" }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, "globals": { "version": "9.18.0", "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==" }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, "has-ansi": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", @@ -895,6 +908,14 @@ "loose-envify": "^1.0.0" } }, + "is-core-module": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", + "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", + "requires": { + "has": "^1.0.3" + } + }, "is-finite": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", @@ -1050,10 +1071,11 @@ } }, "resolve": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", - "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", + "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", "requires": { + "is-core-module": "^2.1.0", "path-parse": "^1.0.6" } }, @@ -1117,22 +1139,22 @@ "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" }, "ttypescript": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/ttypescript/-/ttypescript-1.5.10.tgz", - "integrity": "sha512-Hk7TRej1hM+p+Fo+Pyb/XK9pe9CAt3Sh5n5YRutxFS8hUgkh2u1Vd2K40kMcNP3WYhiVFBMqXwM/2E8O95Ep6g==", + "version": "1.5.12", + "resolved": "https://registry.npmjs.org/ttypescript/-/ttypescript-1.5.12.tgz", + "integrity": "sha512-1ojRyJvpnmgN9kIHmUnQPlEV1gq+VVsxVYjk/NfvMlHSmYxjK5hEvOOU2MQASrbekTUiUM7pR/nXeCc8bzvMOQ==", "requires": { - "resolve": "^1.9.0" + "resolve": ">=1.9.0" } }, "typescript": { - "version": "3.9.7", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.7.tgz", - "integrity": "sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==" + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.3.tgz", + "integrity": "sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg==" }, "upath": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", - "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==" + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/upath/-/upath-2.0.1.tgz", + "integrity": "sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w==" }, "which": { "version": "1.3.1", diff --git a/definitelyTypedTests/package.json b/definitelyTypedTests/package.json index 55c1bf937..85085cb21 100644 --- a/definitelyTypedTests/package.json +++ b/definitelyTypedTests/package.json @@ -18,8 +18,8 @@ "dependencies": { "cross-var": "^1.1.0", "dotenv": "^8.2.0", - "ttypescript": "^1.5.10", - "typescript": "^3.9.7", - "upath": "^1.2.0" + "ttypescript": "^1.5.12", + "typescript": "^4.1.3", + "upath": "^2.0.1" } } diff --git a/package-lock.json b/package-lock.json index b429aaf7a..184fbbee1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12665,9 +12665,9 @@ "dev": true }, "typescript": { - "version": "3.9.7", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.7.tgz", - "integrity": "sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.3.tgz", + "integrity": "sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg==", "dev": true }, "typical": { diff --git a/package.json b/package.json index 80dd03ab0..f9f725f77 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "ts-node": "^9.1.1", "tsconfig-paths": "^3.9.0", "ttypescript": "1.5.12", - "typescript": "^3.9.7", + "typescript": "^4.1.3", "webpack": "^5.10.1", "webpack-cli": "^4.2.0", "webpack-merge": "^5.7.0", @@ -99,7 +99,7 @@ "winston": "^3.3.3" }, "peerDependencies": { - "typescript": "^3.9.5" + "typescript": "^4.0.2" }, "husky": { "hooks": { diff --git a/src/extension/method/function.ts b/src/extension/method/function.ts index be48ac42b..e03313af0 100644 --- a/src/extension/method/function.ts +++ b/src/extension/method/function.ts @@ -2,6 +2,7 @@ export function isFunction( functionToCheck: unknown ): functionToCheck is Function { return ( - functionToCheck && {}.toString.call(functionToCheck) === '[object Function]' + !!functionToCheck && + {}.toString.call(functionToCheck) === '[object Function]' ); }