|
@@ -52,7 +52,7 @@ declare module monaco {
|
|
|
* The value callback to complete a promise
|
|
|
*/
|
|
|
export interface TValueCallback<T> {
|
|
|
- (value: T): void;
|
|
|
+ (value: T | Thenable<T>): void;
|
|
|
}
|
|
|
|
|
|
|
|
@@ -135,7 +135,6 @@ declare module monaco {
|
|
|
*/
|
|
|
export class Uri {
|
|
|
static isUri(thing: any): thing is Uri;
|
|
|
- protected constructor();
|
|
|
/**
|
|
|
* scheme is the 'http' part of 'http://www.msft.com/some/path?query#fragment'.
|
|
|
* The part before the first colon.
|
|
@@ -839,6 +838,17 @@ declare module monaco.editor {
|
|
|
*/
|
|
|
export function setModelMarkers(model: IModel, owner: string, markers: IMarkerData[]): void;
|
|
|
|
|
|
+ /**
|
|
|
+ * Get markers for owner ant/or resource
|
|
|
+ * @returns {IMarkerData[]} list of markers
|
|
|
+ * @param filter
|
|
|
+ */
|
|
|
+ export function getModelMarkers(filter: {
|
|
|
+ owner?: string;
|
|
|
+ resource?: Uri;
|
|
|
+ take?: number;
|
|
|
+ }): IMarker[];
|
|
|
+
|
|
|
/**
|
|
|
* Get the model that has `uri` if it exists.
|
|
|
*/
|
|
@@ -1035,6 +1045,19 @@ declare module monaco.editor {
|
|
|
[index: string]: any;
|
|
|
}
|
|
|
|
|
|
+ export interface IMarker {
|
|
|
+ owner: string;
|
|
|
+ resource: Uri;
|
|
|
+ severity: Severity;
|
|
|
+ code?: string;
|
|
|
+ message: string;
|
|
|
+ source?: string;
|
|
|
+ startLineNumber: number;
|
|
|
+ startColumn: number;
|
|
|
+ endLineNumber: number;
|
|
|
+ endColumn: number;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* A structure defining a problem/warning/etc.
|
|
|
*/
|
|
@@ -4055,7 +4078,7 @@ declare module monaco.languages {
|
|
|
/**
|
|
|
* Provide commands for the given document and range.
|
|
|
*/
|
|
|
- provideCodeActions(model: editor.IReadOnlyModel, range: Range, context: CodeActionContext, token: CancellationToken): CodeAction[] | Thenable<CodeAction[]>;
|
|
|
+ provideCodeActions(model: editor.IReadOnlyModel, range: Range, context: CodeActionContext, token: CancellationToken): Command[] | Thenable<Command[]>;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -4430,14 +4453,6 @@ declare module monaco.languages {
|
|
|
provideHover(model: editor.IReadOnlyModel, position: Position, token: CancellationToken): Hover | Thenable<Hover>;
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * Interface used to quick fix typing errors while accesing member fields.
|
|
|
- */
|
|
|
- export interface CodeAction {
|
|
|
- command: Command;
|
|
|
- score: number;
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* Represents a parameter of a callable-signature. A parameter can
|
|
|
* have a label and a doc-comment.
|