Inferno: Inferno with TypeScript ignores `defaultProps` in JSX

Created on 11 Feb 2021  路  1Comment  路  Source: infernojs/inferno

Observed Behaviour

Inferno with TypeScript ignores defaultProps in JSX.
Error: Property 'value' is missing in type '{}' but required in type 'ComponentPropsType'.
See Inferno example: https://codesandbox.io/s/inferno-ts-example-i0i2c?file=/src/App.tsx.

Expected Current Behaviour

Inferno with TypeScript should notice defaultProps in JSX, like React.
See React example: https://codesandbox.io/s/react-ts-example-2zezs?file=/src/App.tsx.

Inferno Metadata

Inferno v7.4.7

Typescript bug

Most helpful comment

Hi,

Thanks for reporting this issue. I need to investigate where this error actually comes from :)

>All comments

Hi,

Thanks for reporting this issue. I need to investigate where this error actually comes from :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xkxx picture xkxx  路  4Comments

jdalton picture jdalton  路  3Comments

mohammedzamakhan picture mohammedzamakhan  路  3Comments

yury-dymov picture yury-dymov  路  5Comments

Elliot-Evans-95 picture Elliot-Evans-95  路  4Comments