Skip to content
Permalink
Browse files
fix(types): support TypeScript 4.8
fix #6554
  • Loading branch information
yyx990803 committed Aug 31, 2022
1 parent 9875ecd commit 5381abc0571e58a9be6cf482dc50c8db8300f86c
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 64 deletions.
@@ -51,7 +51,7 @@
"devDependencies": {
"@babel/types": "^7.12.0",
"@esbuild-plugins/node-modules-polyfill": "^0.1.4",
"@microsoft/api-extractor": "^7.15.1",
"@microsoft/api-extractor": "~7.20.0",
"@rollup/plugin-commonjs": "^18.0.0",
"@rollup/plugin-json": "^4.0.0",
"@rollup/plugin-node-resolve": "^11.2.1",
@@ -93,7 +93,7 @@
"todomvc-app-css": "^2.3.0",
"ts-jest": "^27.0.5",
"tslib": "^2.4.0",
"typescript": "^4.7.4",
"typescript": "^4.8.0",
"vite": "^2.9.8",
"vue": "workspace:*",
"yorkie": "^2.0.0"
@@ -175,7 +175,7 @@ export type CreateAppFunction<HostElement> = (
let uid = 0

export function createAppAPI<HostElement>(
render: RootRenderFunction,
render: RootRenderFunction<HostElement>,
hydrate?: RootHydrateFunction
): CreateAppFunction<HostElement> {
return function createApp(rootComponent, rootProps = null) {
@@ -324,7 +324,7 @@ export function createCompatVue(
export function installAppCompatProperties(
app: App,
context: AppContext,
render: RootRenderFunction
render: RootRenderFunction<any>
) {
installFilterMethod(app, context)
installLegacyOptionMergeStrats(app.config)
@@ -52,9 +52,7 @@ export interface BaseTransitionProps<HostElement = RendererElement> {
onAppearCancelled?: Hook<(el: HostElement) => void>
}

export interface TransitionHooks<
HostElement extends RendererElement = RendererElement
> {
export interface TransitionHooks<HostElement = RendererElement> {
mode: BaseTransitionProps['mode']
persisted: boolean
beforeEnter(el: HostElement): void
@@ -606,7 +606,7 @@ export function cloneVNode<T, U>(
// key enumeration cost.
const { props, ref, patchFlag, children } = vnode
const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props
const cloned: VNode = {
const cloned: VNode<T, U> = {
__v_isVNode: true,
__v_skip: true,
type: vnode.type,
@@ -661,7 +661,7 @@ export function cloneVNode<T, U>(
anchor: vnode.anchor
}
if (__COMPAT__) {
defineLegacyVNodeProperties(cloned)
defineLegacyVNodeProperties(cloned as VNode)
}
return cloned as any
}

0 comments on commit 5381abc

Please sign in to comment.