Skip to content

Commit 8373ec5

Browse files
authored
chore(typescript): update to typescript 4 (#611)
BREAKING CHANGE: typescript >= 4.0.2 is required to use ts-auto-mock Update your typescript dependency to version >= 4.0.2
1 parent b8f84ba commit 8373ec5

File tree

5 files changed

+45
-22
lines changed

5 files changed

+45
-22
lines changed

definitelyTypedTests/package-lock.json

Lines changed: 35 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

definitelyTypedTests/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
"dependencies": {
1919
"cross-var": "^1.1.0",
2020
"dotenv": "^8.2.0",
21-
"ttypescript": "^1.5.10",
22-
"typescript": "^3.9.7",
23-
"upath": "^1.2.0"
21+
"ttypescript": "^1.5.12",
22+
"typescript": "^4.1.3",
23+
"upath": "^2.0.1"
2424
}
2525
}

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
"ts-node": "^9.1.1",
8888
"tsconfig-paths": "^3.9.0",
8989
"ttypescript": "1.5.12",
90-
"typescript": "^3.9.7",
90+
"typescript": "^4.1.3",
9191
"webpack": "^5.10.1",
9292
"webpack-cli": "^4.2.0",
9393
"webpack-merge": "^5.7.0",
@@ -99,7 +99,7 @@
9999
"winston": "^3.3.3"
100100
},
101101
"peerDependencies": {
102-
"typescript": "^3.9.5"
102+
"typescript": "^4.0.2"
103103
},
104104
"husky": {
105105
"hooks": {

src/extension/method/function.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ export function isFunction(
22
functionToCheck: unknown
33
): functionToCheck is Function {
44
return (
5-
functionToCheck && {}.toString.call(functionToCheck) === '[object Function]'
5+
!!functionToCheck &&
6+
{}.toString.call(functionToCheck) === '[object Function]'
67
);
78
}

0 commit comments

Comments
 (0)