Add outlining spans for Import declarations#23894
Conversation
|
Should the consecutive imports be named sequentialStatements or something similar so we can extend that in future for other statements if need to. |
| case SyntaxKind.ArrayLiteralExpression: | ||
| return spanForObjectOrArrayLiteral(n, SyntaxKind.OpenBracketToken); | ||
| } | ||
| } |
DanielRosenwasser
left a comment
There was a problem hiding this comment.
We must have other code like this somewhere...
| visitImportNode(statements[current] as AnyImportSyntax, sourceFile, cancellationToken, out); | ||
| current++; | ||
| } | ||
| const lastImport = current < n ? statements[current - 1] : statements[n - 1]; |
There was a problem hiding this comment.
I think this is always just current - 1 since as soon as current === n... well, yeah
sure i can do this. i will probably call them
I originally started by adding these, but then it looked weird with only export declarations and not other declarations with |
uniqueiniquity
left a comment
There was a problem hiding this comment.
Looks good to me given Daniel's suggested changes.
|
Updated the PR to change the outlining span kind name to |
|
@DanielRosenwasser other comments? |
This PR adds new outlining spans for import declarations. This adds:
OutliningSpanKindforimport