Skip to content

Commit

Permalink
fix : cleanup type definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
idebenone committed Sep 18, 2024
1 parent fd664cc commit 595f9a2
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ import type { API, BlockTool, BlockToolConstructorOptions, BlockToolData, PasteC
/**
* Data structure for CodeTool's data
*/
export interface CodeData extends BlockToolData {
export type CodeData = BlockToolData<{
/**
* The code content input by the user
*/
code: string;
}
}>;

/**
* Configuration options for the CodeTool provided by the user
Expand Down Expand Up @@ -56,12 +56,7 @@ interface CodeToolNodes {
/**
* Options passed to the constructor of a block tool
*/
interface CodeToolConstructorOptions extends BlockToolConstructorOptions {
/**
* Data specific to the CodeTool
*/
data: CodeData;
}
export type CodeToolConstructorOptions = BlockToolConstructorOptions<CodeData>;

/**
* Code Tool for the Editor.js allows to include code examples in your articles.
Expand Down

0 comments on commit 595f9a2

Please sign in to comment.