index.d.ts 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import { VNode, VNodeRef } from '@vue/runtime-dom'
  2. import { IntrinsicElementAttributes } from './dom'
  3. export type ReservedProps = {
  4. key?: string | number | symbol
  5. ref?: VNodeRef
  6. ref_for?: boolean
  7. ref_key?: string
  8. }
  9. export type NativeElements = {
  10. [K in keyof IntrinsicElementAttributes]: IntrinsicElementAttributes[K] &
  11. ReservedProps
  12. }
  13. /**
  14. * JSX namespace for usage with @jsxImportsSource directive
  15. * when ts compilerOptions.jsx is 'react-jsx' or 'react-jsxdev'
  16. * https://www.typescriptlang.org/tsconfig#jsxImportSource
  17. */
  18. export { h as jsx, h as jsxDEV, Fragment } from '@vue/runtime-dom'
  19. export namespace JSX {
  20. export interface Element extends VNode {}
  21. export interface ElementClass {
  22. $props: {}
  23. }
  24. export interface ElementAttributesProperty {
  25. $props: {}
  26. }
  27. export interface IntrinsicElements extends NativeElements {
  28. // allow arbitrary elements
  29. // @ts-ignore suppress ts:2374 = Duplicate string index signature.
  30. [name: string]: any
  31. }
  32. export interface IntrinsicAttributes extends ReservedProps {}
  33. export interface ElementChildrenAttribute {
  34. $slots: {}
  35. }
  36. }