-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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 of Editor.ui
not resolvable with Yarn (strict) PnP mode
#17213
Comments
Resolved in v42.0.2, please verify :) |
I'm currently running into this issue on the latest version (43.2.0). |
We use a linter that checks for missing |
As an alternative to |
Internal: Update `eslint-config-ckeditor5` to `^9.0.0`. Feature (dependency-checker): Treat type dependencies as production dependencies. Related to ckeditor/ckeditor5#17213. MINOR BREAKING CHANGE (dependency-checker): Treat type dependencies as production dependencies.
Fix: Treat types as production dependencies. Fixes #17213.
The fixes are merged and will be available in the next release. |
📝 Provide detailed reproduction steps (if any)
tsc
to check types✔️ Expected result
The type of
this.editor.ui
to be resolved correctly, so that consequently the type oflocale
in thecomponentFactory.add
call can be inferred.❌ Actual result
The type of
this.editor.ui.componentFactory
is marked asany
yielding an errorParameter 'locale' implicitly has an 'any' type.ts(7006)
.❓ Possible solution
This issue only appears with Yarn PnP mode, as the import
import type { EditorUI } from '@ckeditor/ckeditor5-ui';
within theckeditor5-core
cannot be resolved, since the package is not listed as dependency inckeditor5-core
. To make this resolvable, the@ckeditor/ckeditor5-ui
should be listed as dependency, peerDependency or optional peerDependency in theckeditor5-core
, with the last one probably being the best option.Manual workarounds:
EditorUI
and manually cast with(this.editor.ui as EditorUI)
pnpMode: loose
or non-pnp mode with Yarn.yarnrc.yml
:📃 Other details
If you'd like to see this fixed sooner, add a 👍 reaction to this post.
The text was updated successfully, but these errors were encountered: