improment:command type inference

pr675
黄云飞 4 years ago
parent 266d3701e6
commit e69f4f3751

@ -6,68 +6,67 @@ import { IEditorResult } from '../../interface/Editor'
import { IWatermark } from '../../interface/Watermark' import { IWatermark } from '../../interface/Watermark'
import { CommandAdapt } from './CommandAdapt' import { CommandAdapt } from './CommandAdapt'
export class Command { export class Command {
private static mode: Function private static mode: CommandAdapt['mode']
private static cut: Function private static cut: CommandAdapt['cut']
private static copy: Function private static copy: CommandAdapt['copy']
private static paste: Function private static paste: CommandAdapt['paste']
private static selectAll: Function private static selectAll: CommandAdapt['selectAll']
private static backspace: Function private static backspace: CommandAdapt['backspace']
private static setRange: Function private static setRange: CommandAdapt['setRange']
private static undo: Function private static undo: CommandAdapt['undo']
private static redo: Function private static redo: CommandAdapt['redo']
private static painter: Function private static painter: CommandAdapt['painter']
private static applyPainterStyle: Function private static applyPainterStyle: CommandAdapt['applyPainterStyle']
private static format: Function private static format: CommandAdapt['format']
private static font: Function private static font: CommandAdapt['font']
private static sizeAdd: Function private static sizeAdd: CommandAdapt['sizeAdd']
private static sizeMinus: Function private static sizeMinus: CommandAdapt['sizeMinus']
private static bold: Function private static bold: CommandAdapt['bold']
private static italic: Function private static italic: CommandAdapt['italic']
private static underline: Function private static underline: CommandAdapt['underline']
private static strikeout: Function private static strikeout: CommandAdapt['strikeout']
private static superscript: Function private static superscript: CommandAdapt['superscript']
private static subscript: Function private static subscript: CommandAdapt['subscript']
private static color: Function private static color: CommandAdapt['color']
private static highlight: Function private static highlight: CommandAdapt['highlight']
private static left: Function private static left: CommandAdapt['rowFlex']
private static center: Function private static center: CommandAdapt['rowFlex']
private static right: Function private static right: CommandAdapt['rowFlex']
private static rowMargin: Function private static rowMargin: CommandAdapt['rowMargin']
private static insertTable: Function private static insertTable: CommandAdapt['insertTable']
private static insertTableTopRow: Function private static insertTableTopRow: CommandAdapt['insertTableTopRow']
private static insertTableBottomRow: Function private static insertTableBottomRow: CommandAdapt['insertTableBottomRow']
private static insertTableLeftCol: Function private static insertTableLeftCol: CommandAdapt['insertTableLeftCol']
private static insertTableRightCol: Function private static insertTableRightCol: CommandAdapt['insertTableRightCol']
private static deleteTableRow: Function private static deleteTableRow: CommandAdapt['deleteTableRow']
private static deleteTableCol: Function private static deleteTableCol: CommandAdapt['deleteTableCol']
private static deleteTable: Function private static deleteTable: CommandAdapt['deleteTable']
private static mergeTableCell: Function private static mergeTableCell: CommandAdapt['mergeTableCell']
private static cancelMergeTableCell: Function private static cancelMergeTableCell: CommandAdapt['cancelMergeTableCell']
private static image: Function private static image: CommandAdapt['image']
private static hyperlink: Function private static hyperlink: CommandAdapt['hyperlink']
private static deleteHyperlink: Function private static deleteHyperlink: CommandAdapt['deleteHyperlink']
private static cancelHyperlink: Function private static cancelHyperlink: CommandAdapt['cancelHyperlink']
private static separator: Function private static separator: CommandAdapt['separator']
private static pageBreak: Function private static pageBreak: CommandAdapt['pageBreak']
private static addWatermark: Function private static addWatermark: CommandAdapt['addWatermark']
private static deleteWatermark: Function private static deleteWatermark: CommandAdapt['deleteWatermark']
private static search: Function private static search: CommandAdapt['search']
private static replace: Function private static replace: CommandAdapt['replace']
private static print: Function private static print: CommandAdapt['print']
private static replaceImageElement: Function private static replaceImageElement: CommandAdapt['replaceImageElement']
private static saveAsImageElement: Function private static saveAsImageElement: CommandAdapt['saveAsImageElement']
private static getImage: Function private static getImage: CommandAdapt['getImage']
private static getValue: Function private static getValue: CommandAdapt['getValue']
private static getWordCount: Function private static getWordCount: CommandAdapt['getWordCount']
private static pageMode: Function private static pageMode: CommandAdapt['pageMode']
private static pageScaleRecovery: Function private static pageScaleRecovery: CommandAdapt['pageScaleRecovery']
private static pageScaleMinus: Function private static pageScaleMinus: CommandAdapt['pageScaleMinus']
private static pageScaleAdd: Function private static pageScaleAdd: CommandAdapt['pageScaleAdd']
private static insertElementList: Function private static insertElementList: CommandAdapt['insertElementList']
private static removeControl: Function private static removeControl: CommandAdapt['removeControl']
constructor(adapt: CommandAdapt) { constructor(adapt: CommandAdapt) {
Command.mode = adapt.mode.bind(adapt) Command.mode = adapt.mode.bind(adapt)

Loading…
Cancel
Save