Skip to content

Commit

Permalink
chore: upgrade to typescript 5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jul 11, 2023
1 parent e404a69 commit 2a2810c
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 26 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -97,7 +97,7 @@
"terser": "^5.15.1",
"todomvc-app-css": "^2.3.0",
"tslib": "^2.5.0",
"typescript": "^5.0.0",
"typescript": "^5.1.6",
"vite": "^4.3.0",
"vitest": "^0.30.1"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/dts-test/defineComponent.test-d.tsx
Expand Up @@ -1363,13 +1363,13 @@ describe('function syntax w/ runtime props', () => {
}
)

// @ts-expect-error prop type mismatch
defineComponent(
(_props: { msg: string }) => {
return () => {}
},
{
props: {
// @ts-expect-error prop type mismatch
msg: Number
}
}
Expand Down
4 changes: 2 additions & 2 deletions packages/shared/src/general.ts
Expand Up @@ -52,8 +52,8 @@ export const isObject = (val: unknown): val is Record<any, any> =>
export const isPromise = <T = any>(val: unknown): val is Promise<T> => {
return (
(isObject(val) || isFunction(val)) &&
isFunction(val.then) &&
isFunction(val.catch)
isFunction((val as any).then) &&
isFunction((val as any).catch)
)
}

Expand Down
51 changes: 29 additions & 22 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2a2810c

Please sign in to comment.