mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
Unified type parameter and property types.
This commit is contained in:
Vendored
+5
-4
@@ -10,8 +10,9 @@
|
||||
// Eric Anderson <https://github.com/ericanderson>
|
||||
// Albert Kurniawan <https://github.com/morcerf>
|
||||
// Tanguy Krotoff <https://github.com/tkrotoff>
|
||||
// Dovydas Navickas <https://github.com/DovydasNavickas>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
// TypeScript Version: 2.4
|
||||
|
||||
type NativeAnimationEvent = AnimationEvent;
|
||||
type NativeClipboardEvent = ClipboardEvent;
|
||||
@@ -49,7 +50,7 @@ declare namespace React {
|
||||
}
|
||||
|
||||
interface ReactElement<P> {
|
||||
type: string | ComponentClass<P> | SFC<P>;
|
||||
type: keyof ReactHTML | ComponentClass<P> | SFC<P>;
|
||||
props: P;
|
||||
key: Key | null;
|
||||
}
|
||||
@@ -67,7 +68,7 @@ declare namespace React {
|
||||
type ClassicElement<P> = CElement<P, ClassicComponent<P, ComponentState>>;
|
||||
|
||||
interface DOMElement<P extends DOMAttributes<T>, T extends Element> extends ReactElement<P> {
|
||||
type: string;
|
||||
type: keyof ReactHTML;
|
||||
ref: Ref<T>;
|
||||
}
|
||||
|
||||
@@ -128,7 +129,7 @@ declare namespace React {
|
||||
function createClass<P, S>(spec: ComponentSpec<P, S>): ClassicComponentClass<P>;
|
||||
|
||||
function createFactory<P extends DOMAttributes<T>, T extends Element>(
|
||||
type: string): DOMFactory<P, T>;
|
||||
type: keyof ReactHTML): DOMFactory<P, T>;
|
||||
function createFactory<P>(type: SFC<P>): SFCFactory<P>;
|
||||
function createFactory<P>(
|
||||
type: ClassType<P, ClassicComponent<P, ComponentState>, ClassicComponentClass<P>>): CFactory<P, ClassicComponent<P, ComponentState>>;
|
||||
|
||||
Reference in New Issue
Block a user