-
Notifications
You must be signed in to change notification settings - Fork 78
/
types.ts
32 lines (28 loc) · 969 Bytes
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/**
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
*/
import type { EditorConfig } from 'ckeditor5';
/**
* This file contains types for the CKEditor 5 Vue component.
* These types were moved to a separate file, because the `vue-tsc`
* package couldn't generate the correct types for the component
* when the types were in the component file. This is a workaround
* that may be fixed in the next versions of `vue-tsc`.
*/
/**
* The props accepted by the `<ckeditor>` component.
*/
export interface Props<TEditor> {
editor: TEditor;
config?: EditorConfig;
tagName?: string;
disabled?: boolean;
disableTwoWayDataBinding?: boolean;
}
/**
* The editor type extracted from the editor instance type.
*/
export type ExtractEditorType<TEditor> = TEditor extends { create( ...args: Array<any> ): Promise<infer E> }
? E
: never;