Skip to content

Commit

Permalink
identify optional properties, #6907
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed Nov 23, 2016
1 parent f91e2bb commit c7e44fd
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 23 deletions.
4 changes: 2 additions & 2 deletions src/vs/editor/common/modes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ export interface ParameterInformation {
* The human-readable doc-comment of this signature. Will be shown
* in the UI but can be omitted.
*/
documentation: string;
documentation?: string;
}
/**
* Represents the signature of something callable. A signature
Expand All @@ -265,7 +265,7 @@ export interface SignatureInformation {
* The human-readable doc-comment of this signature. Will be shown
* in the UI but can be omitted.
*/
documentation: string;
documentation?: string;
/**
* The parameters of this signature.
*/
Expand Down
4 changes: 2 additions & 2 deletions src/vs/monaco.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4365,7 +4365,7 @@ declare module monaco.languages {
* The human-readable doc-comment of this signature. Will be shown
* in the UI but can be omitted.
*/
documentation: string;
documentation?: string;
}

/**
Expand All @@ -4383,7 +4383,7 @@ declare module monaco.languages {
* The human-readable doc-comment of this signature. Will be shown
* in the UI but can be omitted.
*/
documentation: string;
documentation?: string;
/**
* The parameters of this signature.
*/
Expand Down
34 changes: 18 additions & 16 deletions src/vs/vscode.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1588,10 +1588,12 @@ declare module 'vscode' {
/**
* The command this code lens represents.
*/
command: Command;
command?: Command;

/**
* `true` when there is a command associated.
*
* @readonly
*/
isResolved: boolean;

Expand Down Expand Up @@ -1682,7 +1684,7 @@ declare module 'vscode' {
* editor will use the range at the current position or the
* current position itself.
*/
range: Range;
range?: Range;

/**
* Creates a new hover object.
Expand Down Expand Up @@ -1749,7 +1751,7 @@ declare module 'vscode' {
/**
* The highlight kind, default is [text](#DocumentHighlightKind.Text).
*/
kind: DocumentHighlightKind;
kind?: DocumentHighlightKind;

/**
* Creates a new document highlight object.
Expand Down Expand Up @@ -2250,7 +2252,7 @@ declare module 'vscode' {
* The human-readable doc-comment of this signature. Will be shown
* in the UI but can be omitted.
*/
documentation: string;
documentation?: string;

/**
* Creates a new parameter information object.
Expand Down Expand Up @@ -2278,7 +2280,7 @@ declare module 'vscode' {
* The human-readable doc-comment of this signature. Will be shown
* in the UI but can be omitted.
*/
documentation: string;
documentation?: string;

/**
* The parameters of this signature.
Expand Down Expand Up @@ -2387,39 +2389,39 @@ declare module 'vscode' {
* The kind of this completion item. Based on the kind
* an icon is chosen by the editor.
*/
kind: CompletionItemKind;
kind?: CompletionItemKind;

/**
* A human-readable string with additional information
* about this item, like type or symbol information.
*/
detail: string;
detail?: string;

/**
* A human-readable string that represents a doc-comment.
*/
documentation: string;
documentation?: string;

/**
* A string that should be used when comparing this item
* with other items. When `falsy` the [label](#CompletionItem.label)
* is used.
*/
sortText: string;
sortText?: string;

/**
* A string that should be used when filtering a set of
* completion items. When `falsy` the [label](#CompletionItem.label)
* is used.
*/
filterText: string;
filterText?: string;

/**
* A string or snippet that should be inserted in a document when selecting
* this completion. When `falsy` the [label](#CompletionItem.label)
* is used.
*/
insertText: string | SnippetString;
insertText?: string | SnippetString;

/**
* A range of text that should be replaced by this completion item.
Expand All @@ -2430,7 +2432,7 @@ declare module 'vscode' {
* *Note:* The range must be a [single line](#Range.isSingleLine) and it must
* [contain](#Range.contains) the position at which completion has been [requested](#CompletionItemProvider.provideCompletionItems).
*/
range: Range;
range?: Range;

/**
* @deprecated **Deprecated** in favor of `CompletionItem.insertText` and `CompletionItem.range`.
Expand All @@ -2442,21 +2444,21 @@ declare module 'vscode' {
* ~~The [range](#Range) of the edit must be single-line and on the same
* line completions were [requested](#CompletionItemProvider.provideCompletionItems) at.~~
*/
textEdit: TextEdit;
textEdit?: TextEdit;

/**
* An optional array of additional [text edits](#TextEdit) that are applied when
* selecting this completion. Edits must not overlap with the main [edit](#CompletionItem.textEdit)
* nor with themselves.
*/
additionalTextEdits: TextEdit[];
additionalTextEdits?: TextEdit[];

/**
* An optional [command](#Command) that is executed *after* inserting this completion. *Note* that
* additional modifications to the current document should be described with the
* [additionalTextEdits](#CompletionItem.additionalTextEdits)-property.
*/
command: Command;
command?: Command;

/**
* Creates a new completion item.
Expand All @@ -2480,7 +2482,7 @@ declare module 'vscode' {
* This list it not complete. Further typing should result in recomputing
* this list.
*/
isIncomplete: boolean;
isIncomplete?: boolean;

/**
* The completion items.
Expand Down
6 changes: 3 additions & 3 deletions src/vs/workbench/api/node/extHostTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ export class CodeLens {
export class ParameterInformation {

label: string;
documentation: string;
documentation?: string;

constructor(label: string, documentation?: string) {
this.label = label;
Expand All @@ -792,7 +792,7 @@ export class ParameterInformation {
export class SignatureInformation {

label: string;
documentation: string;
documentation?: string;
parameters: ParameterInformation[];

constructor(label: string, documentation?: string) {
Expand Down Expand Up @@ -869,7 +869,7 @@ export class CompletionItem {

export class CompletionList {

isIncomplete: boolean;
isIncomplete?: boolean;

items: vscode.CompletionItem[];

Expand Down

0 comments on commit c7e44fd

Please sign in to comment.