"size": "node scripts/build.js vue runtime-dom size-check -p -f global",
"lint": "prettier --write --parser typescript \"packages/**/*.ts?(x)\"",
"test": "node scripts/build.js vue -f global -d && jest",
- "test-dts": "node scripts/build.js reactivity runtime-core runtime-dom -t -f esm && tsd",
+ "test-dts": "node scripts/build.js reactivity runtime-core runtime-dom -dt -f esm-bundler && tsd",
"release": "node scripts/release.js",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
"dev-compiler": "npm-run-all --parallel \"dev template-explorer\" serve",
LifecycleHooks,
currentInstance
} from '../component'
-import { VNode, cloneVNode, isVNode } from '../vnode'
+import { VNode, cloneVNode, isVNode, VNodeProps } from '../vnode'
import { warn } from '../warning'
import { onBeforeUnmount, injectHook, onUnmounted } from '../apiLifecycle'
import { isString, isArray, ShapeFlags } from '@vue/shared'
// also to avoid inline import() in generated d.ts files
export const KeepAlive = (KeepAliveImpl as any) as {
new (): {
- $props: KeepAliveProps
+ $props: VNodeProps & KeepAliveProps
}
}
import { ComponentInternalInstance } from '../component'
import { SuspenseBoundary } from './Suspense'
import { RendererInternals, MoveType } from '../renderer'
-import { VNode, VNodeArrayChildren } from '../vnode'
+import { VNode, VNodeArrayChildren, VNodeProps } from '../vnode'
import { isString, ShapeFlags, PatchFlags } from '@vue/shared'
import { warn } from '../warning'
// Force-casted public typing for h and TSX props inference
export const Portal = (PortalImpl as any) as {
__isPortal: true
- new (): { $props: PortalProps }
+ new (): { $props: VNodeProps & PortalProps }
}
-import { VNode, normalizeVNode, VNodeChild } from '../vnode'
+import { VNode, normalizeVNode, VNodeChild, VNodeProps } from '../vnode'
import { isFunction, isArray, ShapeFlags } from '@vue/shared'
import { ComponentInternalInstance, handleSetupResult } from '../component'
import { Slots } from '../componentSlots'
? SuspenseImpl
: null) as any) as {
__isSuspense: true
- new (): { $props: SuspenseProps }
+ new (): { $props: VNodeProps & SuspenseProps }
}
function mountSuspense(
output.name = packageOptions.name
}
- const shouldEmitDeclarations =
- process.env.TYPES != null &&
- process.env.NODE_ENV === 'production' &&
- !hasTSChecked
+ const shouldEmitDeclarations = process.env.TYPES != null && !hasTSChecked
const tsPlugin = ts({
check: process.env.NODE_ENV === 'production' && !hasTSChecked,
expectType<JSX.Element>(<Fragment key="1" />)
expectType<JSX.Element>(<Portal target="#foo" />)
-// target is required
+expectType<JSX.Element>(<Portal target="#foo" key="1" />)
expectError(<Portal />)
+expectError(<Portal target={1} />)
// KeepAlive
expectType<JSX.Element>(<KeepAlive include="foo" exclude={['a']} />)
+expectType<JSX.Element>(<KeepAlive key="1" />)
expectError(<KeepAlive include={123} />)
// Suspense
expectType<JSX.Element>(<Suspense />)
+expectType<JSX.Element>(<Suspense key="1" />)
expectType<JSX.Element>(<Suspense onResolve={() => {}} onRecede={() => {}} />)
expectError(<Suspense onResolve={123} />)