Updating ReactCSS types to version 1.2

This commit is contained in:
Chris Gervang
2017-03-25 17:13:32 -07:00
committed by GitHub
parent bb7d6b2d08
commit 5c64371d89
+8 -8
View File
@@ -1,12 +1,11 @@
// Type definitions for ReactCSS v1.0.0
// Type definitions for ReactCSS v1.2.0
// Project: http://reactcss.com/
// Definitions by: Karol Janyst <https://github.com/LKay>
// Definitions by: Chris Gervang <https://github.com/chrisgervang>, Karol Janyst <https://github.com/LKay>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.1
// TypeScript Version: 2.2
import * as React from "react"
interface LoopableProps {
"first-child"?: boolean
"last-child"?: boolean
@@ -19,11 +18,12 @@ interface HoverProps {
hover?: boolean
}
interface Classes {
default: any
[scope: string]: any
interface Classes<T> {
default: Partial<T>
[scope: string]: Partial<T>
}
export type CSS = React.CSSProperties
export function hover<A>(component: React.ComponentClass<A> | React.StatelessComponent<A>): React.ComponentClass<A>
export function loop(i: number, length: number): LoopableProps
export default function reactCSS(classes: Classes, ...activations: Array<any>): any
export default function reactCSS<T>(classes: Classes<T>, ...activations: Array<any>): T