@comfit/wasm / HighlightResult
Interface: HighlightResult
Defined in: types.ts:157
An owned snapshot, independent of document edits or registry disposal.
Properties
lineCount
readonlylineCount:number
Defined in: types.ts:159
Number of source lines, without exporting tokens from WASM.
lines
readonlylines: readonlyLine[]
Defined in: types.ts:161
Exported on first access. Read before disposal. Cached lines remain usable afterward.
Methods
dispose()
dispose():
void
Defined in: types.ts:165
Release the WASM snapshot. Previously accessed lines remain usable. Repeated calls are harmless.
Returns
void
renderHtml()
renderHtml(
options?):string
Defined in: types.ts:163
Render without parsing. Rainbow depths are fixed by document.highlight().
Parameters
options?
Returns
string