refactor: define type instead of IndexAccessType (#549)
parent
0ab6c08ea1
commit
3609b7e639
|
@ -1,8 +1,8 @@
|
|||
import { RunJSON, RunPropertyJSON } from "./run";
|
||||
import { IndentJSON } from "./indent";
|
||||
import {
|
||||
CommentRangeStartJSON,
|
||||
CommentRangeEndJSON,
|
||||
CommentRangeStartJSON,
|
||||
SectionPropertyJSON,
|
||||
} from "..";
|
||||
import { LineSpacingJSON } from "./line_spacing";
|
||||
|
@ -61,9 +61,7 @@ export type ParagraphJSON = {
|
|||
};
|
||||
};
|
||||
|
||||
export type InsertJSON = {
|
||||
type: "insert";
|
||||
data: {
|
||||
export type InsertJSONData = {
|
||||
children: (
|
||||
| DeleteJSON
|
||||
| RunJSON
|
||||
|
@ -73,15 +71,21 @@ export type InsertJSON = {
|
|||
author: string;
|
||||
date: string;
|
||||
};
|
||||
|
||||
export type InsertJSON = {
|
||||
type: "insert";
|
||||
data: InsertJSONData;
|
||||
};
|
||||
|
||||
export type DeleteJSON = {
|
||||
type: "delete";
|
||||
data: {
|
||||
export type DeleteJSONData = {
|
||||
children: DeleteChildJSON[];
|
||||
author: string;
|
||||
date: string;
|
||||
};
|
||||
|
||||
export type DeleteJSON = {
|
||||
type: "delete";
|
||||
data: DeleteJSONData;
|
||||
};
|
||||
|
||||
export type HyperlinkJSON = {
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
import { DrawingJSON } from "./drawing";
|
||||
import { ShapeJSON } from "./shape";
|
||||
import { CommentRangeStartJSON, CommentRangeEndJSON } from "..";
|
||||
import { CommentRangeStartJSON, CommentRangeEndJSON, InsertJSONData, DeleteJSONData } from "..";
|
||||
import { BorderType } from "../border";
|
||||
import { InsertJSON, DeleteJSON } from "./paragraph";
|
||||
import { VertAlignType } from "../run";
|
||||
import { FieldChar } from "./bindings/FieldChar";
|
||||
import { InstrHyperlink } from "./bindings/InstrHyperlink";
|
||||
|
@ -43,8 +42,8 @@ export type RunPropertyJSON = {
|
|||
vanish?: boolean | null;
|
||||
spacing?: number | null;
|
||||
textBorder?: TextBorderJSON | null;
|
||||
ins?: InsertJSON["data"] | null;
|
||||
del?: DeleteJSON["data"] | null;
|
||||
ins?: InsertJSONData | null;
|
||||
del?: DeleteJSONData | null;
|
||||
strike?: boolean;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue