mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 17:19:48 +01:00
Mark all properties in ExtensionContext readonly
These values should not be modified
This commit is contained in:
Vendored
+7
-7
@@ -4754,24 +4754,24 @@ declare module 'vscode' {
|
||||
* An array to which disposables can be added. When this
|
||||
* extension is deactivated the disposables will be disposed.
|
||||
*/
|
||||
subscriptions: { dispose(): any }[];
|
||||
readonly subscriptions: { dispose(): any }[];
|
||||
|
||||
/**
|
||||
* A memento object that stores state in the context
|
||||
* of the currently opened [workspace](#workspace.workspaceFolders).
|
||||
*/
|
||||
workspaceState: Memento;
|
||||
readonly workspaceState: Memento;
|
||||
|
||||
/**
|
||||
* A memento object that stores state independent
|
||||
* of the current opened [workspace](#workspace.workspaceFolders).
|
||||
*/
|
||||
globalState: Memento;
|
||||
readonly globalState: Memento;
|
||||
|
||||
/**
|
||||
* The absolute file path of the directory containing the extension.
|
||||
*/
|
||||
extensionPath: string;
|
||||
readonly extensionPath: string;
|
||||
|
||||
/**
|
||||
* Get the absolute path of a resource contained in the extension.
|
||||
@@ -4789,7 +4789,7 @@ declare module 'vscode' {
|
||||
* Use [`workspaceState`](#ExtensionContext.workspaceState) or
|
||||
* [`globalState`](#ExtensionContext.globalState) to store key value data.
|
||||
*/
|
||||
storagePath: string | undefined;
|
||||
readonly storagePath: string | undefined;
|
||||
|
||||
/**
|
||||
* An absolute file path in which the extension can store global state.
|
||||
@@ -4798,14 +4798,14 @@ declare module 'vscode' {
|
||||
*
|
||||
* Use [`globalState`](#ExtensionContext.globalState) to store key value data.
|
||||
*/
|
||||
globalStoragePath: string;
|
||||
readonly globalStoragePath: string;
|
||||
|
||||
/**
|
||||
* An absolute file path of a directory in which the extension can create log files.
|
||||
* The directory might not exist on disk and creation is up to the extension. However,
|
||||
* the parent directory is guaranteed to be existent.
|
||||
*/
|
||||
logPath: string;
|
||||
readonly logPath: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user