1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216
|
=== /node_modules/preact/index.d.ts ===
type Defaultize<Props, Defaults> =
>Defaultize : Defaultize<Props, Defaults>
// Distribute over unions
Props extends any // Make any properties included in Default optional
? Partial<Pick<Props, Extract<keyof Props, keyof Defaults>>> &
// Include the remaining properties from Props
Pick<Props, Exclude<keyof Props, keyof Defaults>>
: never;
export namespace JSXInternal {
interface HTMLAttributes<T = {}> { }
interface SVGAttributes<T = {}> { }
type LibraryManagedAttributes<Component, Props> = Component extends {
>LibraryManagedAttributes : LibraryManagedAttributes<Component, Props>
defaultProps: infer Defaults;
>defaultProps : Defaults
}
? Defaultize<Props, Defaults>
: Props;
interface IntrinsicAttributes {
key?: any;
>key : any
}
interface Element extends VNode<any> { }
interface ElementClass extends Component<any, any> { }
interface ElementAttributesProperty {
props: any;
>props : any
}
interface ElementChildrenAttribute {
children: any;
>children : any
}
interface IntrinsicElements {
div: HTMLAttributes;
>div : HTMLAttributes<{}>
}
}
export const Fragment: unique symbol;
>Fragment : unique symbol
export type ComponentType<T = {}> = {};
>ComponentType : ComponentType<T>
export type ComponentChild = {};
>ComponentChild : {}
export type ComponentChildren = {};
>ComponentChildren : {}
export type VNode<T = {}> = {};
>VNode : VNode<T>
export type Attributes = {};
>Attributes : {}
export type Component<T = {}, U = {}> = {};
>Component : Component<T, U>
=== /node_modules/preact/jsx-runtime/index.d.ts ===
export { Fragment } from '..';
>Fragment : unique symbol
import {
ComponentType,
>ComponentType : any
ComponentChild,
>ComponentChild : any
ComponentChildren,
>ComponentChildren : any
VNode,
>VNode : any
Attributes
>Attributes : any
} from '..';
import { JSXInternal } from '..';
>JSXInternal : any
export function jsx(
>jsx : { (type: string, props: JSXInternal.HTMLAttributes & JSXInternal.SVGAttributes & Record<string, any> & { children?: ComponentChild;}, key?: string): VNode<any>; <P>(type: ComponentType<P>, props: P & { children?: ComponentChild | undefined; }, key?: string | undefined): VNode<any>; }
type: string,
>type : string
props: JSXInternal.HTMLAttributes &
>props : JSXInternal.HTMLAttributes<{}> & JSXInternal.SVGAttributes<{}> & Record<string, any> & { children?: ComponentChild | undefined; }
>JSXInternal : any
JSXInternal.SVGAttributes &
>JSXInternal : any
Record<string, any> & { children?: ComponentChild },
>children : ComponentChild | undefined
key?: string
>key : string | undefined
): VNode<any>;
export function jsx<P>(
>jsx : { (type: string, props: JSXInternal.HTMLAttributes<{}> & JSXInternal.SVGAttributes<{}> & Record<string, any> & { children?: ComponentChild | undefined; }, key?: string | undefined): VNode<any>; <P>(type: ComponentType<P>, props: Attributes & P & { children?: ComponentChild;}, key?: string): VNode<any>; }
type: ComponentType<P>,
>type : ComponentType<P>
props: Attributes & P & { children?: ComponentChild },
>props : P & { children?: ComponentChild | undefined; }
>children : ComponentChild | undefined
key?: string
>key : string | undefined
): VNode<any>;
export function jsxs(
>jsxs : { (type: string, props: JSXInternal.HTMLAttributes & JSXInternal.SVGAttributes & Record<string, any> & { children?: ComponentChild[];}, key?: string): VNode<any>; <P>(type: ComponentType<P>, props: P & { children?: ComponentChild[] | undefined; }, key?: string | undefined): VNode<any>; }
type: string,
>type : string
props: JSXInternal.HTMLAttributes &
>props : JSXInternal.HTMLAttributes<{}> & JSXInternal.SVGAttributes<{}> & Record<string, any> & { children?: ComponentChild[] | undefined; }
>JSXInternal : any
JSXInternal.SVGAttributes &
>JSXInternal : any
Record<string, any> & { children?: ComponentChild[] },
>children : ComponentChild[] | undefined
key?: string
>key : string | undefined
): VNode<any>;
export function jsxs<P>(
>jsxs : { (type: string, props: JSXInternal.HTMLAttributes<{}> & JSXInternal.SVGAttributes<{}> & Record<string, any> & { children?: ComponentChild[] | undefined; }, key?: string | undefined): VNode<any>; <P>(type: ComponentType<P>, props: Attributes & P & { children?: ComponentChild[];}, key?: string): VNode<any>; }
type: ComponentType<P>,
>type : ComponentType<P>
props: Attributes & P & { children?: ComponentChild[] },
>props : P & { children?: ComponentChild[] | undefined; }
>children : ComponentChild[] | undefined
key?: string
>key : string | undefined
): VNode<any>;
export function jsxDEV(
>jsxDEV : { (type: string, props: JSXInternal.HTMLAttributes & JSXInternal.SVGAttributes & Record<string, any> & { children?: ComponentChildren;}, key?: string): VNode<any>; <P>(type: ComponentType<P>, props: P & { children?: ComponentChildren | undefined; }, key?: string | undefined): VNode<any>; }
type: string,
>type : string
props: JSXInternal.HTMLAttributes &
>props : JSXInternal.HTMLAttributes<{}> & JSXInternal.SVGAttributes<{}> & Record<string, any> & { children?: ComponentChildren | undefined; }
>JSXInternal : any
JSXInternal.SVGAttributes &
>JSXInternal : any
Record<string, any> & { children?: ComponentChildren },
>children : ComponentChildren | undefined
key?: string
>key : string | undefined
): VNode<any>;
export function jsxDEV<P>(
>jsxDEV : { (type: string, props: JSXInternal.HTMLAttributes<{}> & JSXInternal.SVGAttributes<{}> & Record<string, any> & { children?: ComponentChildren | undefined; }, key?: string | undefined): VNode<any>; <P>(type: ComponentType<P>, props: Attributes & P & { children?: ComponentChildren;}, key?: string): VNode<any>; }
type: ComponentType<P>,
>type : ComponentType<P>
props: Attributes & P & { children?: ComponentChildren },
>props : P & { children?: ComponentChildren | undefined; }
>children : ComponentChildren | undefined
key?: string
>key : string | undefined
): VNode<any>;
// This shouldn't be preferred over
//export namespace jsxDEV {
// export import JSX = JSXInternal;
//}
// but it sort-of should work and it shouldn't crash.
declare global {
>global : typeof global
// @ts-ignore
export import JSX = JSXInternal;
>JSX : any
>JSXInternal : error
}
=== /index.tsx ===
export const Comp = () => <div></div>;
>Comp : () => JSX.Element
>() => <div></div> : () => JSX.Element
><div></div> : JSX.Element
>div : any
>div : any
|