From badb3201f9264b26111f0597340d9cff69406a5b Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Tue, 6 Jun 2023 16:58:08 +0400 Subject: [PATCH] Update TS --- index.html | 4 ++-- src/index.ts | 9 +++++---- tsconfig.json | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index ff43b26..35ea57f 100644 --- a/index.html +++ b/index.html @@ -15,7 +15,7 @@
diff --git a/src/index.ts b/src/index.ts index 12808f2..68f6095 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,4 @@ -import type grapesjs from 'grapesjs'; +import type { Plugin, BlockProperties, ComponentDefinition } from 'grapesjs'; export type PluginOptions = { /** @@ -18,14 +18,14 @@ export type PluginOptions = { * @example * { label: 'Countdown', category: 'Extra', ... } */ - block?: Partial; + block?: Partial; /** * Object to extend the default component properties. * @example * { name: 'Countdown', droppable: false, ... } */ - props?: grapesjs.ComponentDefinition; + props?: ComponentDefinition; /** * Custom CSS styles for the component. This will replace the default one. @@ -95,7 +95,7 @@ declare global { interface Window { __gjsCountdownIntervals: TElement[]; } } -const plugin: grapesjs.Plugin = (editor, opts = {}) => { +const plugin: Plugin = (editor, opts = {}) => { const options: PluginOptions = { id: 'countdown', label: 'Countdown', @@ -214,6 +214,7 @@ const plugin: grapesjs.Plugin = (editor, opts = {}) => { name: 'endText', changeProp: true, }], + // @ts-ignore components: `
diff --git a/tsconfig.json b/tsconfig.json index 277b963..d83bfdd 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,4 +1,4 @@ { - "extends": "./node_modules/grapesjs-cli/src/template/tsconfig.json", + "extends": "./node_modules/grapesjs-cli/dist/template/tsconfig.json", "include": ["src"] } \ No newline at end of file