diff --git a/types/slate/index.d.ts b/types/slate/index.d.ts index 18664c54d2..58d92dd7ab 100644 --- a/types/slate/index.d.ts +++ b/types/slate/index.d.ts @@ -1131,9 +1131,11 @@ export interface Plugin { schema?: SchemaProperties; } +export interface Plugins extends Array {} + export interface EditorProperties { - onChange?: (change: { operations: Immutable.List, value: Value }) => void; - plugins?: Plugin[]; + onChange?: (change: { operations: Immutable.List; value: Value }) => void; + plugins?: Plugins; readOnly?: boolean; value?: Value; } diff --git a/types/slate/slate-tests.ts b/types/slate/slate-tests.ts index 2c243136fe..77cc12ac8d 100644 --- a/types/slate/slate-tests.ts +++ b/types/slate/slate-tests.ts @@ -114,7 +114,7 @@ const plugin: Plugin = { schema: {...schema}, }; -const plugins = [plugin]; +const plugins = [plugin, [plugin, [plugin]]]; const editor = new Editor({ value, plugins }); const point = Point.create({ key: "a", offset: 0 });