|
| 1 | +///<reference path="fourslash.ts"/> |
| 2 | + |
| 3 | +// @strict: true |
| 4 | +// @jsx: react-jsx |
| 5 | +// @jsxImportSource: preact |
| 6 | +// @filename: /node_modules/preact/index.d.ts |
| 7 | +//// type Defaultize<Props, Defaults> = |
| 8 | +//// // Distribute over unions |
| 9 | +//// Props extends any // Make any properties included in Default optional |
| 10 | +//// ? Partial<Pick<Props, Extract<keyof Props, keyof Defaults>>> & |
| 11 | +//// // Include the remaining properties from Props |
| 12 | +//// Pick<Props, Exclude<keyof Props, keyof Defaults>> |
| 13 | +//// : never; |
| 14 | +//// export namespace JSXInternal { |
| 15 | +//// interface HTMLAttributes<T = {}> { } |
| 16 | +//// interface SVGAttributes<T = {}> { } |
| 17 | +//// type LibraryManagedAttributes<Component, Props> = Component extends { |
| 18 | +//// defaultProps: infer Defaults; |
| 19 | +//// } |
| 20 | +//// ? Defaultize<Props, Defaults> |
| 21 | +//// : Props; |
| 22 | +//// |
| 23 | +//// interface IntrinsicAttributes { |
| 24 | +//// key?: any; |
| 25 | +//// } |
| 26 | +//// |
| 27 | +//// interface Element extends VNode<any> { } |
| 28 | +//// |
| 29 | +//// interface ElementClass extends Component<any, any> { } |
| 30 | +//// |
| 31 | +//// interface ElementAttributesProperty { |
| 32 | +//// props: any; |
| 33 | +//// } |
| 34 | +//// |
| 35 | +//// interface ElementChildrenAttribute { |
| 36 | +//// children: any; |
| 37 | +//// } |
| 38 | +//// |
| 39 | +//// interface IntrinsicElements { |
| 40 | +//// div: HTMLAttributes; |
| 41 | +//// } |
| 42 | +//// } |
| 43 | +//// export const Fragment: unique symbol; |
| 44 | +//// export type ComponentType<T = {}> = {}; |
| 45 | +//// export type ComponentChild = {}; |
| 46 | +//// export type ComponentChildren = {}; |
| 47 | +//// export type VNode<T = {}> = {}; |
| 48 | +//// export type Attributes = {}; |
| 49 | +//// export type Component<T = {}, U = {}> = {}; |
| 50 | +// @filename: /node_modules/preact/jsx-runtime/index.d.ts |
| 51 | +//// export { Fragment } from '..'; |
| 52 | +//// import { |
| 53 | +//// ComponentType, |
| 54 | +//// ComponentChild, |
| 55 | +//// ComponentChildren, |
| 56 | +//// VNode, |
| 57 | +//// Attributes |
| 58 | +//// } from '..'; |
| 59 | +//// import { JSXInternal } from '..'; |
| 60 | +//// |
| 61 | +//// export function jsx( |
| 62 | +//// type: string, |
| 63 | +//// props: JSXInternal.HTMLAttributes & |
| 64 | +//// JSXInternal.SVGAttributes & |
| 65 | +//// Record<string, any> & { children?: ComponentChild }, |
| 66 | +//// key?: string |
| 67 | +//// ): VNode<any>; |
| 68 | +//// export function jsx<P>( |
| 69 | +//// type: ComponentType<P>, |
| 70 | +//// props: Attributes & P & { children?: ComponentChild }, |
| 71 | +//// key?: string |
| 72 | +//// ): VNode<any>; |
| 73 | +//// |
| 74 | +//// |
| 75 | +//// export function jsxs( |
| 76 | +//// type: string, |
| 77 | +//// props: JSXInternal.HTMLAttributes & |
| 78 | +//// JSXInternal.SVGAttributes & |
| 79 | +//// Record<string, any> & { children?: ComponentChild[] }, |
| 80 | +//// key?: string |
| 81 | +//// ): VNode<any>; |
| 82 | +//// export function jsxs<P>( |
| 83 | +//// type: ComponentType<P>, |
| 84 | +//// props: Attributes & P & { children?: ComponentChild[] }, |
| 85 | +//// key?: string |
| 86 | +//// ): VNode<any>; |
| 87 | +//// |
| 88 | +//// |
| 89 | +//// export function jsxDEV( |
| 90 | +//// type: string, |
| 91 | +//// props: JSXInternal.HTMLAttributes & |
| 92 | +//// JSXInternal.SVGAttributes & |
| 93 | +//// Record<string, any> & { children?: ComponentChildren }, |
| 94 | +//// key?: string |
| 95 | +//// ): VNode<any>; |
| 96 | +//// export function jsxDEV<P>( |
| 97 | +//// type: ComponentType<P>, |
| 98 | +//// props: Attributes & P & { children?: ComponentChildren }, |
| 99 | +//// key?: string |
| 100 | +//// ): VNode<any>; |
| 101 | +//// |
| 102 | +//// export import JSX = JSXInternal; |
| 103 | +//// |
| 104 | +// @filename: /index.tsx |
| 105 | +//// export const Comp = () => <div></div>; |
| 106 | + |
| 107 | +verify.noErrors() |
| 108 | +verify.getImports('/index.tsx', []) |
0 commit comments