Make type signature of groupBy more accurate (#272395)

See #272263, it currently assumes that all keys of K will be defined. This still isn't perfect, because it says that the returned object might contain a key with value `undefined`, but in reality, if a key is defined, it will have a value. So now usages of this with Object.entries and so on are slighly wrong, but that's preferable IMO.
This commit is contained in:
Rob Lourens
2025-10-20 21:13:56 -07:00
committed by GitHub
parent 0809a8ebdb
commit b9480e9d7d
9 changed files with 24 additions and 16 deletions

View File

@@ -778,7 +778,7 @@ export class NotebookViewModel extends Disposable implements EditorFoldingStateD
for (const _handle in deletesByHandle) {
const handle = parseInt(_handle);
const ids = deletesByHandle[handle];
const ids = deletesByHandle[handle]!;
const cell = this.getCellByHandle(handle);
cell?.deltaCellStatusBarItems(ids, []);
ids.forEach(id => this._statusBarItemIdToCellMap.delete(id));