src/vs/editor/standalone/browser/standaloneEditor.ts/onWillDisposeModel
export function onWillDisposeModel(listener: (model: ITextModel) => void): IDisposable {
	return StaticServices.modelService.get().onModelRemoved(listener);
}