mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-07 00:07:07 +00:00
Merge pull request #31524 from misspia/master
[slate.js] Add 'object' fields to slate's LeafJSON and MarkJSON
This commit is contained in:
Vendored
+2
@@ -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({}) {
|
||||
|
||||
@@ -12,10 +12,12 @@ const node: BlockJSON = {
|
||||
key: "a",
|
||||
leaves: [
|
||||
{
|
||||
object: "leaf",
|
||||
text: "example",
|
||||
marks: [{
|
||||
data: { testData: "data"},
|
||||
type: "mark"
|
||||
type: "mark",
|
||||
object: "mark"
|
||||
}]
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user