mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
dts-lint error fixed in jsnox.
This commit is contained in:
parent
178b1c2fdb
commit
a4adb4ff04
26
types/jsnox/index.d.ts
vendored
26
types/jsnox/index.d.ts
vendored
@ -1,11 +1,9 @@
|
||||
// Type definitions for JSnoX
|
||||
// Type definitions for JSnoX 2.1
|
||||
// Project: https://github.com/af/jsnox
|
||||
// Definitions by: Steve Baker <https://github.com/stkb/>
|
||||
// Dovydas Navickas <https://github.com/DovydasNavickas>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.4
|
||||
|
||||
/// <reference types="react" />
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
import * as React from "react";
|
||||
|
||||
@ -14,13 +12,10 @@ import * as React from "react";
|
||||
* This will normally be the React object but could be something else
|
||||
*/
|
||||
interface ReactLikeObject {
|
||||
createElement<P>(type: React.ComponentClass<P> | string,
|
||||
props: P, children: React.ReactNode): React.ReactElement<P>;
|
||||
createElement<P>(type: React.ComponentClass<P> | string, props: P, children: React.ReactNode): React.ReactElement<P>;
|
||||
}
|
||||
|
||||
interface Module {
|
||||
(reactObj: ReactLikeObject): CreateElement
|
||||
}
|
||||
type Module = (reactObj: ReactLikeObject) => CreateElement;
|
||||
|
||||
interface CreateElement {
|
||||
/**
|
||||
@ -31,7 +26,7 @@ interface CreateElement {
|
||||
* @param children A single React node (string or ReactElement) or array of nodes.
|
||||
* Note that unlike with React itself, multiple children must be placed into an array.
|
||||
*/
|
||||
<P>(specString: string, children: React.ReactNode): React.DOMElement<P, Element>
|
||||
<P>(specString: string, children: React.ReactNode): React.DOMElement<P, Element>;
|
||||
|
||||
/**
|
||||
* Renders an HTML element from the given spec string, with optional props
|
||||
@ -42,8 +37,7 @@ interface CreateElement {
|
||||
* @param children A single React node (string or ReactElement) or array of nodes.
|
||||
* Note that unlike with React itself, multiple children must be placed into an array.
|
||||
*/
|
||||
<P>(specString: string, props?: React.HTMLAttributes<{}>, children?: React.ReactNode): React.DOMElement<P, Element>
|
||||
|
||||
<P>(specString: string, props?: React.HTMLAttributes<{}>, children?: React.ReactNode): React.DOMElement<P, Element>;
|
||||
|
||||
/**
|
||||
* Renders a React component, with children but no props
|
||||
@ -52,7 +46,7 @@ interface CreateElement {
|
||||
* @param children A single React node (string or ReactElement) or array of nodes.
|
||||
* Note that unlike with React itself, multiple children must be placed into an array.
|
||||
*/
|
||||
<P>(component: React.ComponentClass<P>, children: React.ReactNode): React.ReactElement<P>
|
||||
<P>(component: React.ComponentClass<P>, children: React.ReactNode): React.ReactElement<P>;
|
||||
|
||||
/**
|
||||
* Renders a React component, with optional props and children
|
||||
@ -62,8 +56,8 @@ interface CreateElement {
|
||||
* @param children A single React node (string or ReactElement) or array of nodes.
|
||||
* Note that unlike with React itself, multiple children must be placed into an array.
|
||||
*/
|
||||
<P>(component: React.ComponentClass<P>, props?: P, children?: React.ReactNode): React.ReactElement<P>
|
||||
<P>(component: React.ComponentClass<P>, props?: P, children?: React.ReactNode): React.ReactElement<P>;
|
||||
}
|
||||
|
||||
declare var exports: Module
|
||||
export = exports
|
||||
declare var exports: Module;
|
||||
export = exports;
|
||||
|
||||
2
types/react/index.d.ts
vendored
2
types/react/index.d.ts
vendored
@ -12,7 +12,7 @@
|
||||
// Tanguy Krotoff <https://github.com/tkrotoff>
|
||||
// Dovydas Navickas <https://github.com/DovydasNavickas>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.4
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
type NativeAnimationEvent = AnimationEvent;
|
||||
type NativeClipboardEvent = ClipboardEvent;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user