mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-29 21:11:38 +01:00
Use 'as const' instead of readonly class object
This commit is contained in:
@@ -21,7 +21,7 @@ export namespace ServerResponse {
|
||||
) { }
|
||||
}
|
||||
|
||||
export const NoContent = new class { readonly type = 'noContent'; };
|
||||
export const NoContent = { type: 'noContent' } as const;
|
||||
|
||||
export type Response<T extends Proto.Response> = T | Cancelled | typeof NoContent;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace ServerState {
|
||||
Errored
|
||||
}
|
||||
|
||||
export const None = new class { readonly type = Type.None; };
|
||||
export const None = { type: Type.None } as const;
|
||||
|
||||
export class Running {
|
||||
readonly type = Type.Running;
|
||||
|
||||
Reference in New Issue
Block a user