ckeditor5
ckeditor5 copied to clipboard
[TS] Add types to DLLs
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;
}
}
Decisions to make:
- generate from some file? vs manual creation of
d.ts
- if the manual method, where to keep them?
build
may not be the best place for this. - one file:
index-dll.ts
that is used during DLL build?
We need to start to check this.
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.
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).