jodit / jodit/jodit-react

Typescript Error: Type 'undefined' is not assignable to type 'IDictionary<IControlType<IViewBased | IJodit | IFileBrowser, IToolbarButton>>'.

Open
#116 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
406
Forks
131
Avg merge
2h 32m
Merged PRs (30d)
2

Description

Using the versions of "jodit-react": "^1.0.68" , "react": "^16.9.0" and "typescript": "^3.9.6" but getting the below errors. Kindly assist

` ERROR in /node_modules/jodit/src/core/ui/helpers/get-control-type.ts
[tsl] ERROR in /node_modules/jodit/src/core/ui/helpers/get-control-type.ts(28,13)
TS1109: Expression expected.

ERROR in /node_modules/jodit/src/core/ui/helpers/get-control-type.ts
[tsl] ERROR in /node_modules/jodit/src/core/ui/helpers/get-control-type.ts(33,7)
TS2532: Object is possibly 'undefined'.

ERROR in /node_modules/jodit/src/core/ui/helpers/get-control-type.ts
[tsl] ERROR in /node_modules/jodit/src/core/ui/helpers/get-control-type.ts(35,8)
TS2532: Object is possibly 'undefined'.

ERROR in /node_modules/jodit/src/core/ui/helpers/get-control-type.ts
[tsl] ERROR in /node_modules/jodit/src/core/ui/helpers/get-control-type.ts(40,43)
TS2345: Argument of type 'Controls | undefined' is not assignable to parameter of type 'Controls'.
Type 'undefined' is not assignable to type 'IDictionary<IControlType<IViewBased | IJodit | IFileBrowser, IToolbarButton>>'.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[ERROR] Command execution failed`

Anyone seeing this?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the reported build with jodit-react 1.0.68, React 16.9.0, and TypeScript 3.9.6, then inspect node_modules/jodit/src/core/ui/helpers/get-control-type.ts at the reported lines. Done means the listed TypeScript errors no longer occur during the build.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.