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

Fix generated .d.ts in builds to include types of loaded plugins #13678

Merged
merged 3 commits into from
Mar 14, 2023

Conversation

filipsobol
Copy link
Member

@filipsobol filipsobol commented Mar 14, 2023

Suggested merge commit message (convention)

Fix (build-*): Typings from the CKEditor 5 builds contain types of loaded plugins. Closes #13676.

@filipsobol filipsobol changed the title Ck/13676 fix dts in build packages Fix generated .d.ts in builds to include types of loaded plugins Mar 14, 2023
@pomek
Copy link
Member

pomek commented Mar 14, 2023

I would improve the merge message a bit:

Fix (build-*): Typings from the CKEditor 5 builds contain types of loaded plugins.

@@ -32,82 +32,80 @@ import { CloudServices } from '@ckeditor/ckeditor5-cloud-services';
*/
import '../theme/theme.css';

export default class BalloonEditor extends BalloonEditorBase {}
export default class BalloonEditor extends BalloonEditorBase {
public static override builtinPlugins = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the trick work because builtinPlugins have a tuple type with all plugin types?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, tuple uses types imported from plugin packages and this gives a TypeScript a chance to load module augmentations with them.

@filipsobol filipsobol requested review from pomek and arkflpc March 14, 2023 11:25
Copy link
Member

@pomek pomek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@pomek pomek merged commit fea9b5a into master Mar 14, 2023
@pomek pomek deleted the ck/13676-fix-dts-in-build-packages branch March 14, 2023 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix .d.ts in ckeditor5-build-* packages to include types for loaded plugins
4 participants