Skip to content

Commit 0537f30

Browse files
authored
Mark TransientOptions properties readonly (microsoft#166071)
This type is passed to us and should not be modified
1 parent cb43019 commit 0537f30

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/vs/workbench/contrib/notebook/common/notebookCommon.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,15 @@ export interface NotebookCellDefaultCollapseConfig {
124124

125125
export type InteractiveWindowCollapseCodeCells = 'always' | 'never' | 'fromEditor';
126126

127-
export type TransientCellMetadata = { [K in keyof NotebookCellMetadata]?: boolean };
128-
export type CellContentMetadata = { [K in keyof NotebookCellMetadata]?: boolean };
129-
export type TransientDocumentMetadata = { [K in keyof NotebookDocumentMetadata]?: boolean };
127+
export type TransientCellMetadata = { readonly [K in keyof NotebookCellMetadata]?: boolean };
128+
export type CellContentMetadata = { readonly [K in keyof NotebookCellMetadata]?: boolean };
129+
export type TransientDocumentMetadata = { readonly [K in keyof NotebookDocumentMetadata]?: boolean };
130130

131131
export interface TransientOptions {
132-
transientOutputs: boolean;
133-
transientCellMetadata: TransientCellMetadata;
134-
transientDocumentMetadata: TransientDocumentMetadata;
135-
cellContentMetadata: CellContentMetadata;
132+
readonly transientOutputs: boolean;
133+
readonly transientCellMetadata: TransientCellMetadata;
134+
readonly transientDocumentMetadata: TransientDocumentMetadata;
135+
readonly cellContentMetadata: CellContentMetadata;
136136
}
137137

138138
/** Note: enum values are used for sorting */

0 commit comments

Comments
 (0)