mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 15:05:39 +01:00
This commit is contained in:
parent
c9255aa6eb
commit
1be8b30e74
2 changed files with 21 additions and 9 deletions
10
monaco.d.ts
vendored
10
monaco.d.ts
vendored
|
|
@ -19,7 +19,9 @@ declare namespace monaco.languages.typescript {
|
||||||
None = 0,
|
None = 0,
|
||||||
Preserve = 1,
|
Preserve = 1,
|
||||||
React = 2,
|
React = 2,
|
||||||
ReactNative = 3
|
ReactNative = 3,
|
||||||
|
ReactJSX = 4,
|
||||||
|
ReactJSXDev = 5
|
||||||
}
|
}
|
||||||
export enum NewLineKind {
|
export enum NewLineKind {
|
||||||
CarriageReturnLineFeed = 0,
|
CarriageReturnLineFeed = 0,
|
||||||
|
|
@ -303,7 +305,11 @@ declare namespace monaco.languages.typescript {
|
||||||
* Get signature help items for the item at the given file and position.
|
* Get signature help items for the item at the given file and position.
|
||||||
* @returns `Promise<typescript.SignatureHelpItems | undefined>`
|
* @returns `Promise<typescript.SignatureHelpItems | undefined>`
|
||||||
*/
|
*/
|
||||||
getSignatureHelpItems(fileName: string, position: number): Promise<any | undefined>;
|
getSignatureHelpItems(
|
||||||
|
fileName: string,
|
||||||
|
position: number,
|
||||||
|
options: any
|
||||||
|
): Promise<any | undefined>;
|
||||||
/**
|
/**
|
||||||
* Get quick info for the item at the given position in the file.
|
* Get quick info for the item at the given position in the file.
|
||||||
* @returns `Promise<typescript.QuickInfo | undefined>`
|
* @returns `Promise<typescript.QuickInfo | undefined>`
|
||||||
|
|
|
||||||
|
|
@ -1094,13 +1094,19 @@ export class RenameAdapter extends Adapter implements languages.RenameProvider {
|
||||||
|
|
||||||
const edits: languages.WorkspaceTextEdit[] = [];
|
const edits: languages.WorkspaceTextEdit[] = [];
|
||||||
for (const renameLocation of renameLocations) {
|
for (const renameLocation of renameLocations) {
|
||||||
edits.push({
|
const resource = Uri.parse(renameLocation.fileName);
|
||||||
resource: Uri.parse(renameLocation.fileName),
|
const model = editor.getModel(resource);
|
||||||
edit: {
|
if (model) {
|
||||||
range: this._textSpanToRange(model, renameLocation.textSpan),
|
edits.push({
|
||||||
text: newName
|
resource,
|
||||||
}
|
edit: {
|
||||||
});
|
range: this._textSpanToRange(model, renameLocation.textSpan),
|
||||||
|
text: newName
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
throw new Error(`Unknown URI ${resource}.`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return { edits };
|
return { edits };
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue