ComponentOptionsMixin,
RenderFunction
} from './componentOptions'
-import { SetupContext, FunctionalComponent } from './component'
+import {
+ SetupContext,
+ FunctionalComponent,
+ AllowedComponentProps,
+ ComponentCustomProps
+} from './component'
import {
CreateComponentPublicInstance,
ComponentPublicInstanceConstructor
import { ExtractPropTypes, ComponentPropsOptions } from './componentProps'
import { EmitsOptions } from './componentEmits'
import { isFunction } from '@vue/shared'
-import {
- VNodeProps,
- AllowedComponentProps,
- ComponentCustomProps
-} from './vnode'
+import { VNodeProps } from './vnode'
// defineComponent is a utility that is primarily used for type inference
// when declaring components. Type inference is provided in the component
export type Data = Record<string, unknown>
+/**
+ * For extending allowed non-declared props on components in TSX
+ */
+export interface ComponentCustomProps {}
+
+/**
+ * Default allowed non-declared props on ocmponent in TSX
+ */
+export interface AllowedComponentProps {
+ class?: unknown
+ style?: unknown
+}
+
// Note: can't mark this whole interface internal because some public interfaces
// extend it.
export interface ComponentInternalOptions {
// Advanced render function utilities
export { createVNode, cloneVNode, mergeProps, isVNode } from './vnode'
// VNode types
-export { Fragment, Text, Comment, Static, ComponentCustomProps } from './vnode'
+export { Fragment, Text, Comment, Static } from './vnode'
// Built-in components
export { Teleport, TeleportProps } from './components/Teleport'
export { Suspense, SuspenseProps } from './components/Suspense'
Component,
FunctionalComponent,
ComponentInternalInstance,
- SetupContext
+ SetupContext,
+ ComponentCustomProps,
+ AllowedComponentProps
} from './component'
export {
ComponentOptions,
| VNodeMountHook[]
| VNodeUpdateHook[]
-export interface ComponentCustomProps {}
-export interface AllowedComponentProps {
- class?: unknown
- style?: unknown
-}
-
// https://github.com/microsoft/TypeScript/issues/33099
export type VNodeProps = {
key?: string | number