-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #296 from ckeditor/fix-typings
Fix: Fix the component properties and event types. Internal: Add `tsconfig.json` to the demo. Internal: Lint only the `.ts` and `.vue` files.
- Loading branch information
Showing
5 changed files
with
50 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"extends": "../tsconfig.json", | ||
"compilerOptions": { | ||
"types": [ | ||
"../src/plugin.ts" | ||
] | ||
}, | ||
"include": [ | ||
"**/*" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/** | ||
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. | ||
* For licensing, see LICENSE.md. | ||
*/ | ||
|
||
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,5 +26,7 @@ | |
"declaration": true, | ||
"declarationDir": "./dist" | ||
}, | ||
"include": ["src/plugin.ts"] | ||
"include": [ | ||
"src" | ||
] | ||
} |