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 lists files to release in the new snapshot. A file is only fully closed once every API client that opened it closes it.
|
|
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.
|
|
FileChanges describes file system changes since the last snapshot.
|
|
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.
|
|
OpenProjects lists tsconfig.json files to open/load in the new snapshot. Opens are ref-counted and persist across snapshots until closed.
|
Static members
| Static member |
Description
|
|
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.
|