Skip to content

Commit

Permalink
[react] Add comment about removed index signature
Browse files Browse the repository at this point in the history
  • Loading branch information
frenic committed Apr 12, 2018
1 parent df8f3b8 commit 2a77093
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion types/react/index.d.ts
Expand Up @@ -897,7 +897,27 @@ declare namespace React {
onTransitionEndCapture?: TransitionEventHandler<T>;
}

export interface CSSProperties extends CSS.Properties<string | number> {}
export interface CSSProperties extends CSS.Properties<string | number> {
/**
* The index signature was removed to enable closed typing for style
* using CSSType. You're able to use module augmentation to add other
* properties, like CSS Custom Properties, or add a index signature
* of your own.
*
* ```ts
* // my-react.d.ts
* import * as React from 'react';
*
* declare module 'react' {
* interface CSSProperties {
* '--my-custom-property': string;
* // or
* [index: string]: any;
* }
* }
* ```
*/
}

interface HTMLAttributes<T> extends DOMAttributes<T> {
// React-specific Attributes
Expand Down

0 comments on commit 2a77093

Please sign in to comment.