diff --git a/types/slate/index.d.ts b/types/slate/index.d.ts index 2538bea6f9..1f17afe93f 100644 --- a/types/slate/index.d.ts +++ b/types/slate/index.d.ts @@ -327,6 +327,7 @@ export interface LeafProperties { export interface LeafJSON { marks?: MarkJSON[]; text?: string; + object: "leaf"; } export class Leaf extends Immutable.Record({}) { @@ -521,6 +522,7 @@ export interface MarkProperties { export interface MarkJSON { type: string; data?: { [key: string]: any }; + object: "mark"; } export class Mark extends Immutable.Record({}) { diff --git a/types/slate/slate-tests.ts b/types/slate/slate-tests.ts index 344d4da3ee..07f15dcaac 100644 --- a/types/slate/slate-tests.ts +++ b/types/slate/slate-tests.ts @@ -12,10 +12,12 @@ const node: BlockJSON = { key: "a", leaves: [ { + object: "leaf", text: "example", marks: [{ data: { testData: "data"}, - type: "mark" + type: "mark", + object: "mark" }] } ]