@@ -21,20 +21,20 @@ export interface INotificationProperties {
2121 * Sticky notifications are not automatically removed after a certain timeout. By
2222 * default, notifications with primary actions and severity error are always sticky.
2323 */
24- sticky ?: boolean ;
24+ readonly sticky ?: boolean ;
2525
2626 /**
2727 * Silent notifications are not shown to the user unless the notification center
2828 * is opened. The status bar will still indicate all number of notifications to
2929 * catch some attention.
3030 */
31- silent ?: boolean ;
31+ readonly silent ?: boolean ;
3232
3333 /**
3434 * Adds an action to never show the notification again. The choice will be persisted
3535 * such as future requests will not cause the notification to show again.
3636 */
37- neverShowAgain ?: INeverShowAgainOptions ;
37+ readonly neverShowAgain ?: INeverShowAgainOptions ;
3838}
3939
4040export enum NeverShowAgainScope {
@@ -55,38 +55,38 @@ export interface INeverShowAgainOptions {
5555 /**
5656 * The id is used to persist the selection of not showing the notification again.
5757 */
58- id : string ;
58+ readonly id : string ;
5959
6060 /**
6161 * By default the action will show up as primary action. Setting this to true will
6262 * make it a secondary action instead.
6363 */
64- isSecondary ?: boolean ;
64+ readonly isSecondary ?: boolean ;
6565
6666 /**
6767 * Whether to persist the choice in the current workspace or for all workspaces. By
6868 * default it will be persisted for all workspaces.
6969 */
70- scope ?: NeverShowAgainScope ;
70+ readonly scope ?: NeverShowAgainScope ;
7171}
7272
7373export interface INotification extends INotificationProperties {
7474
7575 /**
7676 * The severity of the notification. Either `Info`, `Warning` or `Error`.
7777 */
78- severity : Severity ;
78+ readonly severity : Severity ;
7979
8080 /**
8181 * The message of the notification. This can either be a `string` or `Error`. Messages
8282 * can optionally include links in the format: `[text](link)`
8383 */
84- message : NotificationMessage ;
84+ readonly message : NotificationMessage ;
8585
8686 /**
8787 * The source of the notification appears as additional information.
8888 */
89- source ?: string ;
89+ readonly source ?: string ;
9090
9191 /**
9292 * Actions to show as part of the notification. Primary actions show up as
@@ -106,7 +106,7 @@ export interface INotification extends INotificationProperties {
106106 * The initial set of progress properties for the notification. To update progress
107107 * later on, access the `INotificationHandle.progress` property.
108108 */
109- progress ?: INotificationProgressProperties ;
109+ readonly progress ?: INotificationProgressProperties ;
110110}
111111
112112export interface INotificationActions {
@@ -115,32 +115,32 @@ export interface INotificationActions {
115115 * Primary actions show up as buttons as part of the message and will close
116116 * the notification once clicked.
117117 */
118- primary ?: ReadonlyArray < IAction > ;
118+ readonly primary ?: ReadonlyArray < IAction > ;
119119
120120 /**
121121 * Secondary actions are meant to provide additional configuration or context
122122 * for the notification and will show up less prominent. A notification does not
123123 * close automatically when invoking a secondary action.
124124 */
125- secondary ?: ReadonlyArray < IAction > ;
125+ readonly secondary ?: ReadonlyArray < IAction > ;
126126}
127127
128128export interface INotificationProgressProperties {
129129
130130 /**
131131 * Causes the progress bar to spin infinitley.
132132 */
133- infinite ?: boolean ;
133+ readonly infinite ?: boolean ;
134134
135135 /**
136136 * Indicate the total amount of work.
137137 */
138- total ?: number ;
138+ readonly total ?: number ;
139139
140140 /**
141141 * Indicate that a specific chunk of work is done.
142142 */
143- worked ?: number ;
143+ readonly worked ?: number ;
144144}
145145
146146export interface INotificationProgress {
@@ -176,7 +176,7 @@ export interface INotificationHandle {
176176 /**
177177 * Will be fired whenever the visibility of the notification changes.
178178 * A notification can either be visible as toast or inside the notification
179- * center if it is visible.
179+ * center if it is visible.
180180 */
181181 readonly onDidChangeVisibility : Event < boolean > ;
182182
@@ -214,19 +214,19 @@ export interface IPromptChoice {
214214 /**
215215 * Label to show for the choice to the user.
216216 */
217- label : string ;
217+ readonly label : string ;
218218
219219 /**
220220 * Primary choices show up as buttons in the notification below the message.
221221 * Secondary choices show up under the gear icon in the header of the notification.
222222 */
223- isSecondary ?: boolean ;
223+ readonly isSecondary ?: boolean ;
224224
225225 /**
226226 * Whether to keep the notification open after the choice was selected
227227 * by the user. By default, will close the notification upon click.
228228 */
229- keepOpen ?: boolean ;
229+ readonly keepOpen ?: boolean ;
230230
231231 /**
232232 * Triggered when the user selects the choice.
@@ -249,13 +249,13 @@ export interface IStatusMessageOptions {
249249 * An optional timeout after which the status message should show. By default
250250 * the status message will show immediately.
251251 */
252- showAfter ?: number ;
252+ readonly showAfter ?: number ;
253253
254254 /**
255255 * An optional timeout after which the status message is to be hidden. By default
256256 * the status message will not hide until another status message is displayed.
257257 */
258- hideAfter ?: number ;
258+ readonly hideAfter ?: number ;
259259}
260260
261261export enum NotificationsFilter {
0 commit comments