File tree Expand file tree Collapse file tree
extensions/typescript-language-features/src
workbench/services/progress/browser Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ export namespace ServerResponse {
2121 ) { }
2222 }
2323
24- export const NoContent = new class { readonly type = 'noContent' ; } ;
24+ export const NoContent = { type : 'noContent' } as const ;
2525
2626 export type Response < T extends Proto . Response > = T | Cancelled | typeof NoContent ;
2727}
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ namespace ServerState {
4747 Errored
4848 }
4949
50- export const None = new class { readonly type = Type . None ; } ;
50+ export const None = { type : Type . None } as const ;
5151
5252 export class Running {
5353 readonly type = Type . Running ;
Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ export namespace CodeActionsState {
141141 Triggered ,
142142 }
143143
144- export const Empty = new class { readonly type = Type . Empty ; } ;
144+ export const Empty = { type : Type . Empty } as const ;
145145
146146 export class Triggered {
147147 readonly type = Type . Triggered ;
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ namespace LightBulbState {
2525 Showing ,
2626 }
2727
28- export const Hidden = new class { readonly type = Type . Hidden ; } ;
28+ export const Hidden = { type : Type . Hidden } as const ;
2929
3030 export class Showing {
3131 readonly type = Type . Showing ;
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ namespace ParameterHintState {
2626 Pending ,
2727 }
2828
29- export const Default = new class { readonly type = Type . Default ; } ;
29+ export const Default = { type : Type . Default } as const ;
3030
3131 export class Pending {
3232 readonly type = Type . Pending ;
Original file line number Diff line number Diff line change @@ -117,9 +117,9 @@ namespace ProgressIndicatorState {
117117 Work
118118 }
119119
120- export const None = new class { readonly type = Type . None ; } ;
121- export const Done = new class { readonly type = Type . Done ; } ;
122- export const Infinite = new class { readonly type = Type . Infinite ; } ;
120+ export const None = { type : Type . None } as const ;
121+ export const Done = { type : Type . Done } as const ;
122+ export const Infinite = { type : Type . Infinite } as const ;
123123
124124 export class While {
125125 readonly type = Type . While ;
You can’t perform that action at this time.
0 commit comments