* Allow special assignments to have a contextual type of their declared type if present * Expand change to cover all js special assignments * Remove extraneous line
15 lines
280 B
TypeScript
15 lines
280 B
TypeScript
interface MyComponentProps {
|
|
color: "red" | "blue"
|
|
}
|
|
|
|
interface StatelessComponent<P> {
|
|
(): any;
|
|
defaultProps?: Partial<P>;
|
|
}
|
|
|
|
const MyComponent: StatelessComponent<MyComponentProps> = () => null as any;
|
|
|
|
MyComponent.defaultProps = {
|
|
color: "red"
|
|
};
|