The definition of the API contains quite some arrays, like vscode.window.visibleTextEdits, and usually the contract is that those arrays are 'readonly' or shallow copies. To express that more clearly we should investigate the use of ReadonlyArray<T> which defined the JS-array without any of it's modifying operations.