I\'m building a VS Code extension which includes changing the name/title of untitled-1
tab (unsaved file).
I tried running the below code in debugger consol
It's not possible - if you check out the source code for the API definition in vscode.d.ts, you'll see that fileName
is declared as readonly
:
export interface TextDocument {
// ...
readonly fileName: string;
// ...
}
Unfortunately, it seems that the readonly
attribute isn't reflected in the API docs on the website.