Clean up few more calls to object.freeze

- Fixed explicit casts hiding some type errors on object passed to `object.freeze` (too many properties or missing properties)
- Remove some extra casts
- Fixed casts of `Object.freeze` removing readonly
This commit is contained in:
Matt Bierner
2022-03-16 15:59:53 -07:00
parent 7ba9564ac6
commit 342e05815a
8 changed files with 13 additions and 11 deletions

View File

@@ -106,7 +106,7 @@ export class ExtHostDocumentSaveParticipant implements ExtHostDocumentSavePartic
const { document, reason } = stubEvent;
const { version } = document;
const event = Object.freeze(<vscode.TextDocumentWillSaveEvent>{
const event = Object.freeze<vscode.TextDocumentWillSaveEvent>({
document,
reason,
waitUntil(p: Promise<any | vscode.TextEdit[]>) {