feat(language-service): completions support for tuple array (#33928)

PR Close #33928
This commit is contained in:
ivanwonder
2019-11-20 07:23:45 +00:00
committed by Miško Hevery
parent de7713d6ea
commit 5a227d8d7c
6 changed files with 33 additions and 5 deletions

View File

@ -116,9 +116,12 @@ export interface Symbol {
/**
* Return the type of the expression if this symbol is indexed by `argument`.
* Sometimes we need the key of arguments to get the type of the expression, for example
* in the case of tuples (`type Example = [string, number]`).
* [string, number]).
* If the symbol cannot be indexed, this method should return `undefined`.
*/
indexed(argument: Symbol): Symbol|undefined;
indexed(argument: Symbol, key?: any): Symbol|undefined;
}
/**
@ -349,4 +352,4 @@ export interface SymbolQuery {
* Return the span of the narrowest non-token node at the given location.
*/
getSpanAt(line: number, column: number): Span|undefined;
}
}