Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1633907
commit 7a08d91
Showing
6 changed files
with
11,768 additions
and
18,144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
/** | ||
* Customize the displayed name of a useState, useReducer or useRef hook | ||
* in the devtools panel. | ||
* | ||
* @param value Wrapped native hook. | ||
* @param name Custom name | ||
*/ | ||
export function addHookName<T>(value: T, name: string): T; | ||
/** | ||
* Display a custom label for a custom hook for the devtools panel | ||
* @type {<T>(value: T, name: string) => T} | ||
*/ | ||
export function addHookName<T>(value: T, name: string): T; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,37 @@ | ||
export { Fragment } from '../../'; | ||
import { | ||
ComponentType, | ||
ComponentChild, | ||
ComponentChildren, | ||
VNode, | ||
Attributes | ||
} from '../../'; | ||
import { JSXInternal } from '../../src/jsx'; | ||
|
||
export function jsx( | ||
type: string, | ||
props: JSXInternal.HTMLAttributes & | ||
JSXInternal.SVGAttributes & | ||
Record<string, any> & { children?: ComponentChild }, | ||
key?: string | ||
): VNode<any>; | ||
export function jsx<P>( | ||
type: ComponentType<P>, | ||
props: Attributes & P & { children?: ComponentChild }, | ||
key?: string | ||
): VNode<any>; | ||
|
||
export function jsxs( | ||
type: string, | ||
props: JSXInternal.HTMLAttributes & | ||
JSXInternal.SVGAttributes & | ||
Record<string, any> & { children?: ComponentChild[] }, | ||
key?: string | ||
): VNode<any>; | ||
export function jsxs<P>( | ||
type: ComponentType<P>, | ||
props: Attributes & P & { children?: ComponentChild[] }, | ||
key?: string | ||
): VNode<any>; | ||
|
||
export function jsxDEV( | ||
type: string, | ||
props: JSXInternal.HTMLAttributes & | ||
JSXInternal.SVGAttributes & | ||
Record<string, any> & { children?: ComponentChildren }, | ||
key?: string | ||
): VNode<any>; | ||
export function jsxDEV<P>( | ||
type: ComponentType<P>, | ||
props: Attributes & P & { children?: ComponentChildren }, | ||
key?: string | ||
): VNode<any>; | ||
|
||
export { JSXInternal as JSX }; | ||
export type VNode = any; | ||
/** | ||
* @fileoverview | ||
* This file exports various methods that implement Babel's "automatic" JSX runtime API: | ||
* - jsx(type, props, key) | ||
* - jsxs(type, props, key) | ||
* - jsxDEV(type, props, key, __source, __self) | ||
* | ||
* The implementation of createVNode here is optimized for performance. | ||
* Benchmarks: https://esbench.com/bench/5f6b54a0b4632100a7dcd2b3 | ||
*/ | ||
/** | ||
* JSX.Element factory used by Babel's {runtime:"automatic"} JSX transform | ||
* @param {VNode['type']} type | ||
* @param {VNode['props']} props | ||
* @param {VNode['key']} [key] | ||
* @param {string} [__self] | ||
* @param {string} [__source] | ||
*/ | ||
declare function createVNode(type: any, props: any, key?: any, __self?: string, __source?: string): { | ||
type: any; | ||
props: {}; | ||
key: any; | ||
ref: any; | ||
_children: any; | ||
_parent: any; | ||
_depth: number; | ||
_dom: any; | ||
_nextDom: any; | ||
_component: any; | ||
_hydrating: any; | ||
constructor: any; | ||
_original: number; | ||
__source: string; | ||
__self: string; | ||
}; | ||
export { createVNode as jsx, createVNode as jsxs, createVNode as jsxDEV, Fragment }; |
Oops, something went wrong.