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

[TS MVP] Create typings for editor config #11728

Closed
arkflpc opened this issue May 6, 2022 · 2 comments
Closed

[TS MVP] Create typings for editor config #11728

arkflpc opened this issue May 6, 2022 · 2 comments
Labels
domain:ts squad:core Issue to be handled by the Core team. type:task This issue reports a chore (non-production change) and other types of "todos".

Comments

@arkflpc
Copy link
Contributor

arkflpc commented May 6, 2022

To achieve the first goal of #11704 (Improving the DX for the community), it would be very helpful to have editor config statically typed.

The config can be used in different contexts:

  1. As a parameter to Editor.create()
  2. Within plugins: editor.config.define() in constructor and editor.config.get() later.

I would try to solve the first one and at least investigate if we can achieve the second.

If possible, we should avoid centralized type for the config and assemble it somehow from definitions near plugins that define them. We wouldn't introduce unnecessary coupling, and the user would be able to extend it as well. Maybe we could use some magic type interference based on plugin classes provided to create() method. If that fails, the centralized config type covering only plugins included in ckeditor5 is better than the fully dynamic one.

Part of #11708.

@arkflpc arkflpc added squad:core Issue to be handled by the Core team. type:task This issue reports a chore (non-production change) and other types of "todos". domain:ts and removed type:task This issue reports a chore (non-production change) and other types of "todos". labels May 6, 2022
@arkflpc
Copy link
Contributor Author

arkflpc commented Oct 10, 2022

At least one plugin that declares its config should be rewritten first. Then, we could test in different package if this config is visible as a member of EditorConfig interface.

@arkflpc arkflpc closed this as completed Dec 16, 2022
@arkflpc
Copy link
Contributor Author

arkflpc commented Dec 16, 2022

Seems to be done in other tickets

@Reinmar Reinmar added this to the iteration 59 (v35.4.0) milestone Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:ts squad:core Issue to be handled by the Core team. type:task This issue reports a chore (non-production change) and other types of "todos".
Projects
None yet
Development

No branches or pull requests

2 participants