Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973 (#6381)

* Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973

* disable strict null check
This commit is contained in:
Anthony Dresser
2019-07-15 22:35:46 -07:00
committed by GitHub
parent f720ec642f
commit 0b7e7ddbf9
2406 changed files with 59140 additions and 35464 deletions

71
src/vs/monaco.d.ts vendored
View File

@@ -453,7 +453,7 @@ declare namespace monaco {
readonly column: number;
constructor(lineNumber: number, column: number);
/**
* Create a new postion from this position.
* Create a new position from this position.
*
* @param newLineNumber new line number
* @param newColumn new column
@@ -986,6 +986,10 @@ declare namespace monaco.editor {
* A label to be used to identify the web worker for debugging purposes.
*/
label?: string;
/**
* An object that can be used by the web worker to make calls back to the main thread.
*/
host?: any;
}
/**
@@ -1180,25 +1184,45 @@ declare namespace monaco.editor {
}
/**
* Options for rendering a model decoration in the overview ruler.
* Position in the minimap to render the decoration.
*/
export interface IModelDecorationOverviewRulerOptions {
export enum MinimapPosition {
Inline = 1
}
export interface IDecorationOptions {
/**
* CSS color to render in the overview ruler.
* CSS color to render.
* e.g.: rgba(100, 100, 100, 0.5) or a color from the color registry
*/
color: string | ThemeColor | undefined;
/**
* CSS color to render in the overview ruler.
* CSS color to render.
* e.g.: rgba(100, 100, 100, 0.5) or a color from the color registry
*/
darkColor?: string | ThemeColor;
}
/**
* Options for rendering a model decoration in the overview ruler.
*/
export interface IModelDecorationOverviewRulerOptions extends IDecorationOptions {
/**
* The position in the overview ruler.
*/
position: OverviewRulerLane;
}
/**
* Options for rendering a model decoration in the overview ruler.
*/
export interface IModelDecorationMinimapOptions extends IDecorationOptions {
/**
* The position in the overview ruler.
*/
position: MinimapPosition;
}
/**
* Options for a model decoration.
*/
@@ -1233,6 +1257,10 @@ declare namespace monaco.editor {
* If set, render this decoration in the overview ruler.
*/
overviewRuler?: IModelDecorationOverviewRulerOptions | null;
/**
* If set, render this decoration in the minimap.
*/
minimap?: IModelDecorationMinimapOptions | null;
/**
* If set, the decoration will be rendered in the glyph margin with this CSS class name.
*/
@@ -4275,7 +4303,7 @@ declare namespace monaco.languages {
* - f = foreground ColorId (9 bits)
* - b = background ColorId (9 bits)
* - The color value for each colorId is defined in IStandaloneThemeData.customTokenColors:
* e.g colorId = 1 is stored in IStandaloneThemeData.customTokenColors[1]. Color id = 0 means no color,
* e.g. colorId = 1 is stored in IStandaloneThemeData.customTokenColors[1]. Color id = 0 means no color,
* id = 1 is for the default foreground color, id = 2 for the default background.
*/
tokens: Uint32Array;
@@ -4437,7 +4465,7 @@ declare namespace monaco.languages {
/**
* Provide commands for the given document and range.
*/
provideCodeActions(model: editor.ITextModel, range: Range, context: CodeActionContext, token: CancellationToken): (Command | CodeAction)[] | Promise<(Command | CodeAction)[]>;
provideCodeActions(model: editor.ITextModel, range: Range, context: CodeActionContext, token: CancellationToken): CodeActionList | Promise<CodeActionList>;
}
/**
@@ -4898,6 +4926,10 @@ declare namespace monaco.languages {
isPreferred?: boolean;
}
export interface CodeActionList extends IDisposable {
readonly actions: ReadonlyArray<CodeAction>;
}
/**
* Represents a parameter of a callable-signature. A parameter can
* have a label and a doc-comment.
@@ -4957,6 +4989,10 @@ declare namespace monaco.languages {
activeParameter: number;
}
export interface SignatureHelpResult extends IDisposable {
value: SignatureHelp;
}
export enum SignatureHelpTriggerKind {
Invoke = 1,
TriggerCharacter = 2,
@@ -4980,7 +5016,7 @@ declare namespace monaco.languages {
/**
* Provide help for the signature at the given position and document.
*/
provideSignatureHelp(model: editor.ITextModel, position: Position, token: CancellationToken, context: SignatureHelpContext): ProviderResult<SignatureHelp>;
provideSignatureHelp(model: editor.ITextModel, position: Position, token: CancellationToken, context: SignatureHelpContext): ProviderResult<SignatureHelpResult>;
}
/**
@@ -5258,6 +5294,7 @@ declare namespace monaco.languages {
export interface ILink {
range: IRange;
url?: Uri | string;
tooltip?: string;
}
export interface ILinksList {
@@ -5346,7 +5383,6 @@ declare namespace monaco.languages {
}
export interface SelectionRange {
kind: string;
range: IRange;
}
@@ -5453,16 +5489,21 @@ declare namespace monaco.languages {
arguments?: any[];
}
export interface ICodeLensSymbol {
export interface CodeLens {
range: IRange;
id?: string;
command?: Command;
}
export interface CodeLensList {
lenses: CodeLens[];
dispose(): void;
}
export interface CodeLensProvider {
onDidChange?: IEvent<this>;
provideCodeLenses(model: editor.ITextModel, token: CancellationToken): ProviderResult<ICodeLensSymbol[]>;
resolveCodeLens?(model: editor.ITextModel, codeLens: ICodeLensSymbol, token: CancellationToken): ProviderResult<ICodeLensSymbol>;
provideCodeLenses(model: editor.ITextModel, token: CancellationToken): ProviderResult<CodeLensList>;
resolveCodeLens?(model: editor.ITextModel, codeLens: CodeLens, token: CancellationToken): ProviderResult<CodeLens>;
}
export interface ILanguageExtensionPoint {
@@ -5610,7 +5651,11 @@ declare namespace monaco.worker {
getValue(): string;
}
export interface IWorkerContext {
export interface IWorkerContext<H = undefined> {
/**
* A proxy to the main thread host object.
*/
host: H;
/**
* Get all available mirror models in this worker.
*/