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] Add types to DLLs #13855

Closed
Tracked by #12027
Witoso opened this issue Apr 11, 2023 · 3 comments
Closed
Tracked by #12027

[TS] Add types to DLLs #13855

Witoso opened this issue Apr 11, 2023 · 3 comments
Assignees
Labels
resolution:expired This issue was closed due to lack of feedback. squad:core Issue to be handled by the Core team.

Comments

@Witoso
Copy link
Member

Witoso commented Apr 11, 2023

When using DLL's I want to have access to types.

Examples from the prototypes:

// image.d.ts:
import type * as image from '@ckeditor/ckeditor5-image';

declare module 'ckeditor5/build/ckeditor5-dll.js' {
	interface CKEditor5DLL {
		image: typeof image;
	}
}
// ckeditor5-dll.d.ts
import type * as clipboard from '@ckeditor/ckeditor5-clipboard';
import type * as core from '@ckeditor/ckeditor5-core';
import type * as engine from '@ckeditor/ckeditor5-engine';
import type * as enter from '@ckeditor/ckeditor5-enter';
import type * as paragraph from '@ckeditor/ckeditor5-paragraph';
import type * as selectAll from '@ckeditor/ckeditor5-select-all';
import type * as typing from '@ckeditor/ckeditor5-typing';
import type * as ui from '@ckeditor/ckeditor5-ui';
import type * as undo from '@ckeditor/ckeditor5-undo';
import type * as upload from '@ckeditor/ckeditor5-upload';
import type * as utils from '@ckeditor/ckeditor5-utils';
import type * as watchdog from '@ckeditor/ckeditor5-watchdog';
import type * as widget from '@ckeditor/ckeditor5-widget';

export interface CKEditor5DLL {
	clipboard: typeof clipboard;
	core: typeof core;
	engine: typeof engine;
	enter: typeof enter;
	paragraph: typeof paragraph;
	selectAll: typeof selectAll;
	typing: typeof typing;
	ui: typeof ui;
	undo: typeof undo;
	upload: typeof upload;
	utils: typeof utils;
	watchdog: typeof watchdog;
	widget: typeof widget;
}

declare global {
	interface Window {
		CKEditor5: CKEditor5DLL;
	}
}
@Witoso Witoso added the squad:core Issue to be handled by the Core team. label Apr 11, 2023
@Witoso Witoso changed the title Add types to DLLs [TS] Add types to DLLs Apr 11, 2023
@Witoso
Copy link
Member Author

Witoso commented Apr 12, 2023

Decisions to make:

  1. generate from some file? vs manual creation ofd.ts
  2. if the manual method, where to keep them? build may not be the best place for this.
  3. one file: index-dll.ts that is used during DLL build?

We need to start to check this.

@CKEditorBot CKEditorBot added the status:planned Set automatically when an issue lands in the "Sprint backlog" column. We will be working on it soon. label Apr 12, 2023
@niegowski niegowski self-assigned this Apr 24, 2023
@CKEditorBot CKEditorBot added status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. and removed status:planned Set automatically when an issue lands in the "Sprint backlog" column. We will be working on it soon. labels Apr 24, 2023
@CKEditorBot CKEditorBot added status:planned Set automatically when an issue lands in the "Sprint backlog" column. We will be working on it soon. and removed status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. labels May 5, 2023
@CKEditorBot CKEditorBot added status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. and removed status:planned Set automatically when an issue lands in the "Sprint backlog" column. We will be working on it soon. labels May 22, 2023
@CKEditorBot CKEditorBot added status:planned Set automatically when an issue lands in the "Sprint backlog" column. We will be working on it soon. and removed status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. labels Jul 3, 2023
@CKEditorBot
Copy link
Collaborator

There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.

@CKEditorBot
Copy link
Collaborator

We've closed your issue due to inactivity. We understand that the issue may still be relevant. If so, feel free to open a new one (and link this issue to it).

@CKEditorBot CKEditorBot added resolution:expired This issue was closed due to lack of feedback. and removed status:stale labels Jun 12, 2024
@CKEditorBot CKEditorBot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 12, 2024
@CKEditorBot CKEditorBot removed the status:planned Set automatically when an issue lands in the "Sprint backlog" column. We will be working on it soon. label Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution:expired This issue was closed due to lack of feedback. squad:core Issue to be handled by the Core team.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants