Functions
isEmpty
- isEmpty(doc: Doc): boolean
-
Parameters
Returns boolean
isLineNext
- isLineNext(doc: Doc): boolean
-
Parameters
Returns boolean
mapDoc
- mapDoc<T>(doc: Doc, callback: (doc: Doc) => T): T
-
Type parameters
Parameters
-
-
callback: (doc: Doc) => T
Returns T
propagateBreaks
- propagateBreaks(doc: Doc): void
-
Parameters
Returns void
removeLines
-
Parameters
Returns Doc
stripTrailingHardline
- stripTrailingHardline(doc: Doc): Doc
-
Parameters
Returns Doc
traverseDoc
- traverseDoc(doc: Doc, onEnter?: undefined | ((doc: Doc) => void | boolean), onExit?: undefined | ((doc: Doc) => void), shouldTraverseConditionalGroups?: undefined | false | true): void
-
Parameters
-
-
Optional onEnter: undefined | ((doc: Doc) => void | boolean)
-
Optional onExit: undefined | ((doc: Doc) => void)
-
Optional shouldTraverseConditionalGroups: undefined | false | true
Returns void
willBreak
- willBreak(doc: Doc): boolean
-
Parameters
Returns boolean