extensions/typescript-language-features/src/languageFeatures/rename.ts/TypeScriptRenameProvider/provideRenameEdits
class TypeScriptRenameProvider:	public async provideRenameEdits(
		document: vscode.TextDocument,
		position: vscode.Position,
		newName: string,
		token: vscode.CancellationToken
	): Promise<vscode.WorkspaceEdit | null> {
		const response = await this.execRename(document, position, token);
		if (!response || response.type !== 'response' || !response.body) {
			return null;
		}

		const renameInfo = response.body.info;
		if (!renameInfo.canRename) {
			return Promise.reject<vscode.WorkspaceEdit>(renameInfo.localizedErrorMessage);
		}

		if (renameInfo.fileToRename) {
			const edits = await this.renameFile(renameInfo.fileToRename, newName, token);
			if (edits) {
				return edits;
			} else {
				return Promise.reject<vscode.WorkspaceEdit>(vscode.l10n.t("An error occurred while renaming file"));
			}
		}

		return this.updateLocs(response.body.locs, newName);
	}