Skip to content

Commit 2a2810c

Browse files
committed
chore: upgrade to typescript 5.1
1 parent e404a69 commit 2a2810c

File tree

4 files changed

+33
-26
lines changed

4 files changed

+33
-26
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
"terser": "^5.15.1",
9898
"todomvc-app-css": "^2.3.0",
9999
"tslib": "^2.5.0",
100-
"typescript": "^5.0.0",
100+
"typescript": "^5.1.6",
101101
"vite": "^4.3.0",
102102
"vitest": "^0.30.1"
103103
}

packages/dts-test/defineComponent.test-d.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1363,13 +1363,13 @@ describe('function syntax w/ runtime props', () => {
13631363
}
13641364
)
13651365

1366-
// @ts-expect-error prop type mismatch
13671366
defineComponent(
13681367
(_props: { msg: string }) => {
13691368
return () => {}
13701369
},
13711370
{
13721371
props: {
1372+
// @ts-expect-error prop type mismatch
13731373
msg: Number
13741374
}
13751375
}

packages/shared/src/general.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ export const isObject = (val: unknown): val is Record<any, any> =>
5252
export const isPromise = <T = any>(val: unknown): val is Promise<T> => {
5353
return (
5454
(isObject(val) || isFunction(val)) &&
55-
isFunction(val.then) &&
56-
isFunction(val.catch)
55+
isFunction((val as any).then) &&
56+
isFunction((val as any).catch)
5757
)
5858
}
5959

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)