Skip to content

Commit

Permalink
Add @template description
Browse files Browse the repository at this point in the history
  • Loading branch information
hata6502 committed Feb 20, 2021
1 parent 02f943a commit 602bfcf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 0 additions & 1 deletion docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

- `New` - `toolbar.toggleBlockSettings()` API method added [#1442](https://github.com/codex-team/editor.js/issues/1421).
- `Improvements` - A generic type for Tool config added [#1516](https://github.com/codex-team/editor.js/issues/1516)
- `Improvements` - A generic type for OutputBlockData added [#1326](https://github.com/codex-team/editor.js/pull/1326)
- `Improvements` - Remove unused `force` option in `Caret.navigateNext()` and `Caret.navigatePrevious()` [#857](https://github.com/codex-team/editor.js/issues/857#issuecomment-770363438).
- `Improvements` - Remove bundles from the repo [#1541](https://github.com/codex-team/editor.js/pull/1541).
- `Improvements` - Document will be scrolled when blocks are selected with `SHIFT+UP` or `SHIFT+DOWN` [#1447](https://github.com/codex-team/editor.js/issues/1447)
Expand Down
9 changes: 6 additions & 3 deletions types/data-formats/output-data.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,19 @@ import {BlockToolData} from '../tools';

/**
* Output of one Tool
*
* @template Type - the string literal describing a tool type
* @template Data - the structure describing a data object supported by the tool
*/
export interface OutputBlockData<S extends string = string, T extends object = any> {
export interface OutputBlockData<Type extends string = string, Data extends object = any> {
/**
* Tool type
*/
type: S;
type: Type;
/**
* Saved Block data
*/
data: BlockToolData<T>;
data: BlockToolData<Data>;
}

export interface OutputData {
Expand Down

0 comments on commit 602bfcf

Please sign in to comment.