New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typing issues with Typescript 3 and new LibraryManagedAttributes feature #11697

Closed
cdeutsch opened this Issue Aug 9, 2018 · 13 comments

Comments

Projects
None yet
@cdeutsch
Contributor

cdeutsch commented Aug 9, 2018

  • I have searched the issues of this repository and believe that this is not a duplicate.

Possibly related to #11677

Version

3.8.0

Environment

typescript@3.0.1 @types/react@16.4.8 @types/react-dom@16.0.7

Reproduction link

https://github.com/cdeutsch/LibraryManagedAttributes-Repro/

Steps to reproduce

Try to use <Input> with TypeScript 3 and latest @types/react and @types/react-dom

What is expected?

No errors

What is actually happening?

Type '{}' is not assignable to type 'Pick<MergePropTypes<Readonly<{ children?: ReactNode; }> & Readonly, InferProps<{ type: any; id: any; size: any; maxLength: any; disabled: any; value: any; defaultValue: any; className: any; addonBefore: any; ... 9 more ...; suffix: any; }>>, "children" | ... 281 more ... | "autosize">'.
Property 'autosize' is missing in type '{}'.


More information here:
DefinitelyTyped/DefinitelyTyped#27805

@huangbinjie

This comment has been minimized.

huangbinjie commented Aug 10, 2018

I have the same issue.

3 similar comments
@fengweilin

This comment has been minimized.

fengweilin commented Aug 11, 2018

I have the same issue.

@graykick

This comment has been minimized.

graykick commented Aug 11, 2018

I have the same issue.

@danielg2002

This comment has been minimized.

Contributor

danielg2002 commented Aug 12, 2018

I have the same issue.

@IssuehuntBot

This comment has been minimized.

IssuehuntBot commented Aug 13, 2018

@BoostIO funded this issue with $30. Visit this issue on Issuehunt

@yesmeck yesmeck closed this in be74114 Aug 13, 2018

@IssuehuntBot

This comment has been minimized.

IssuehuntBot commented Aug 13, 2018

@elie222

This comment has been minimized.

elie222 commented Aug 16, 2018

Same issue. When will the fix get pushed to npm?

@cdeutsch

This comment has been minimized.

Contributor

cdeutsch commented Aug 17, 2018

@elie222 it should already be fixed.

Requires upgrading Ant and @types/react and @types/react-dom

@eloff

This comment has been minimized.

eloff commented Sep 8, 2018

With tsc 3.0.1 I was getting:

Property 'autosize' is missing in type for Input
Property 'combobox' is missing in type for Select
Property 'htmlType' is missing in type for Button

When I upgraded to antd (3.9.1), @types/react (16.4.13), and @types/react-dom (16.0.7) the problem went away.

@Spenhouet

This comment has been minimized.

Spenhouet commented Sep 19, 2018

@elie222 it should already be fixed.

Requires upgrading Ant and @types/react and @types/react-dom

I don't use Ant at all, upgraded to "@types/react": "^16.4.14" and "@types/react-dom": "^16.0.7" but this error persists.

What else can I do? Where is this error coming from? Where do I need to raise the awareness?

@Spenhouet

This comment has been minimized.

Spenhouet commented Sep 19, 2018

For me the workaround is adding "skipLibCheck": true to tsconfig.json.

https://stackoverflow.com/a/52404148/2230045

@giodelabarrera

This comment has been minimized.

giodelabarrera commented Dec 3, 2018

In the configuration file tsconfig.jsonof your application that includes your library, add this rule "strictNullChecks": false

@Beraliv

This comment has been minimized.

Beraliv commented Dec 5, 2018

For me the workaround is adding "skipLibCheck": true to tsconfig.json.

https://stackoverflow.com/a/52404148/2230045

This isn't good workaround
Better not use Typescript then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment