We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2b1930c commit 36525c1Copy full SHA for 36525c1
2 files changed
src/index.d.ts
@@ -87,7 +87,7 @@ export type ComponentProps<
87
: never;
88
89
export interface FunctionComponent<P = {}> {
90
- (props: RenderableProps<P>, context?: any): VNode<any>;
+ (props: RenderableProps<P>, context?: any): VNode<any> | null;
91
displayName?: string;
92
defaultProps?: Partial<P>;
93
}
test/ts/preact.tsx
@@ -312,3 +312,5 @@ let elementProps: ComponentProps<'button'> = {
312
// Typing of style property
313
const acceptsNumberAsLength = <div style={{ marginTop: 20 }} />;
314
const acceptsStringAsLength = <div style={{ marginTop: '20px' }} />;
315
+
316
+const ReturnNull: FunctionalComponent = () => null;
0 commit comments