Skip to content
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

Type 'EditorState' is not assignable to type 'null' #133

Closed
claitonnazaret opened this issue Jun 6, 2020 · 5 comments
Closed

Type 'EditorState' is not assignable to type 'null' #133

claitonnazaret opened this issue Jun 6, 2020 · 5 comments
Labels
bug Something isn't working

Comments

@claitonnazaret
Copy link

TypeScript error in G:/sgp/web-app/node_modules/mui-rte/src/MUIRichTextEditor.tsx(754,13):
Type 'EditorState' is not assignable to type 'null'. TS2322

in MUIRichTextEditor.tsx:747 change line let replaceEditorState = null; to let replaceEditorState;

in utils.ts:24 change line let entityType = null; to let entityType = '';

@niuware niuware added the question Further information is requested label Jun 8, 2020
@niuware
Copy link
Owner

niuware commented Jun 8, 2020

Hi @claitonnazaret, I need more context for this but I am guessing this is related with your typescript configuration, although even with strictNullChecks enabled, the compilation does not have any problems.

@claitonnazaret
Copy link
Author

My compilation presents this error message
image

My tsconfig:

image

@niuware niuware added bug Something isn't working and removed question Further information is requested labels Jun 9, 2020
@niuware
Copy link
Owner

niuware commented Jun 9, 2020

I pushed an update and this should be fixed on version 1.19.2. Please check it out.

@niuware niuware closed this as completed Jun 9, 2020
@claitonnazaret
Copy link
Author

Version 1.19.2 corrected the error Type 'EditorState' is not assignable to type 'null', but a new error appeared in the utils.ts file on line 24 that starts the entityType variable with null. When changing to '' the error is corrected according to the prints below:

image

The line:

image

Correction:

image

Appreciate...

@niuware
Copy link
Owner

niuware commented Jun 9, 2020

Missed the second one you wrote on your comment.

Should be fixed on version 1.19.3. Please check it out.

@niuware niuware closed this as completed Jun 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants