Logo Xantham

UpdateSnapshotParams Type

UpdateSnapshotParams are the parameters for creating a new snapshot. All fields are optional. With no fields set, the server adopts the latest LSP state.

Record fields

Record Field Description

CloseFiles

Full Usage: CloseFiles

Field type: DocumentIdentifier[] voption

CloseFiles lists files to release in the new snapshot. A file is only fully closed once every API client that opened it closes it.

Field type: DocumentIdentifier[] voption

CloseProjects

Full Usage: CloseProjects

Field type: DocumentIdentifier[] voption

CloseProjects lists tsconfig.json files to release in the new snapshot. A project is only unloaded once every API client that opened it closes it.

Field type: DocumentIdentifier[] voption

FileChanges

Full Usage: FileChanges

Field type: APIFileChanges voption

FileChanges describes file system changes since the last snapshot.

Field type: APIFileChanges voption

OpenFiles

Full Usage: OpenFiles

Field type: DocumentIdentifier[] voption

OpenFiles lists files to keep open for the API client, mirroring LSP's textDocument/didOpen. For each file, ancestor directories are searched for a tsconfig that contains it; if found, that configured project is loaded and becomes the file's default project. Otherwise the file is loaded into the inferred project (e.g. a node_modules d.ts not in any project's import graph). Opens persist across snapshots until the file is closed.

Field type: DocumentIdentifier[] voption

OpenProjects

Full Usage: OpenProjects

Field type: DocumentIdentifier[] voption

OpenProjects lists tsconfig.json files to open/load in the new snapshot. Opens are ref-counted and persist across snapshots until closed.

Field type: DocumentIdentifier[] voption

Static members

Static member Description

UpdateSnapshotParams.Default

Full Usage: UpdateSnapshotParams.Default

Returns: UpdateSnapshotParams

The record with nothing set: every field is either optional or a default of its own, so this serialises to `{}`. Copy-update it to fill in the fields you mean - `{ UpdateSnapshotParams.Default with ... }` - rather than writing all 5 out.

Returns: UpdateSnapshotParams

Type something to start searching.