mirror of https://github.com/vuejs/core.git
37 lines
1007 B
TypeScript
37 lines
1007 B
TypeScript
// global JSX namespace registration
|
|
// somehow we have to copy=pase the jsx-runtime types here to make TypeScript happy
|
|
import { VNode, VNodeRef } from '@vue/runtime-dom'
|
|
import { IntrinsicElementAttributes } from './jsx-runtime/dom'
|
|
|
|
export * from './jsx-runtime/dom'
|
|
|
|
export type ReservedProps = {
|
|
key?: string | number | symbol
|
|
ref?: VNodeRef
|
|
ref_for?: boolean
|
|
ref_key?: string
|
|
}
|
|
|
|
export type NativeElements = {
|
|
[K in keyof IntrinsicElementAttributes]: IntrinsicElementAttributes[K] &
|
|
ReservedProps
|
|
}
|
|
|
|
declare global {
|
|
namespace JSX {
|
|
export interface Element extends VNode {}
|
|
export interface ElementClass {
|
|
$props: {}
|
|
}
|
|
export interface ElementAttributesProperty {
|
|
$props: {}
|
|
}
|
|
export interface IntrinsicElements extends NativeElements {
|
|
// allow arbitrary elements
|
|
// @ts-ignore suppress ts:2374 = Duplicate string index signature.
|
|
[name: string]: any
|
|
}
|
|
export interface IntrinsicAttributes extends ReservedProps {}
|
|
}
|
|
}
|