Skip to content

@comfit/wasm / Document

Interface: Document

Defined in: types.ts:169

A source document that keeps its syntax trees and cached highlighting.

Properties

source

readonly source: string

Defined in: types.ts:170

Methods

dispose()

dispose(): void

Defined in: types.ts:176

Release the document. Existing snapshots remain usable. Repeated calls are harmless.

Returns

void


highlight()

highlight(options?): HighlightResult

Defined in: types.ts:174

Return an independent snapshot. Dispose each snapshot when no longer needed.

Parameters

options?

HighlightOptions

Returns

HighlightResult


update()

update(source): void

Defined in: types.ts:172

Incrementally parse changed source. If the source is unchanged, do nothing.

Parameters

source

string

Returns

void