From https://github.com/microsoft/vscode/issues/73311
TypeScript Version: 3.5.0-dev.20190507
Search Terms:
Repo
git clone https://github.com/mjbvz/vscode-73311
cd vscode-73311
npm install
code-insiders .
index.js and try triggering suggestions after Flex by deleting the trailing x then typing it againThe project uses styled components:
import styled from "styled-components";
type Justify = "space-around" | "space-between";
export const FlexBox = styled.div<{
column?: boolean;
justify?: Justify;
}>`
display: flex;
flex-direction: ${props => (props.column ? "column" : "row")};
${props => !!props.justify && `justify-content: ${props.justify}`}
`;
export const Flex = styled.div<{ flex?: number }>`
flex: ${props => props.flex || 1};
`;
Bug
The completionEntryDetails request this triggers can often take half a second or longer to process:
Info 214 [15:56:42.198] request:
{"seq":37,"type":"request","command":"completionEntryDetails","arguments":{"file":"/Users/matb/projects/san/index.ts","line":1,"offset":5,"entryNames":[{"name":"Flex","source":"/Users/matb/projects/san/components"}]}}
Info 215 [15:56:42.199] getCompletionData: Get current token: 0
Info 216 [15:56:42.199] getCompletionData: Is inside comment: 0
Info 217 [15:56:42.199] getCompletionData: Get previous token 1: 0
Info 218 [15:56:42.199] getCompletionData: Get previous token 2: 0
Info 219 [15:56:42.202] getCompletionData: Semantic work: 3
Perf 220 [15:56:43.103] 37::completionEntryDetails: elapsed time (in milliseconds) 905.5459
Info 221 [15:56:43.105] response:
{"seq":0,"type":"response","command":"completionEntryDetails","request_seq":37,"success":true,"body":[{"name":"Flex","kindModifiers":"export","kind":"const","displayParts":[{"text":"const","kind":"keyword"},{"text":" ","kind":"space"},{"text":"Flex","kind":"localName"},{"text":":","kind":"punctuation"},{"text":" ","kind":"space"},{"text":"StyledComponent","kind":"aliasName"},{"text":"<","kind":"punctuation"},{"text":"\"div\"","kind":"stringLiteral"},{"text":",","kind":"punctuation"},{"text":" ","kind":"space"},{"text":"any","kind":"keyword"},{"text":",","kind":"punctuation"},{"text":" ","kind":"space"},{"text":"{","kind":"punctuation"},{"text":"\n","kind":"lineBreak"},{"text":" ","kind":"space"},{"text":"flex","kind":"propertyName"},{"text":"?","kind":"punctuation"},{"text":":","kind":"punctuation"},{"text":" ","kind":"space"},{"text":"number","kind":"keyword"},{"text":";","kind":"punctuation"},{"text":"\n","kind":"lineBreak"},{"text":"}","kind":"punctuation"},{"text":",","kind":"punctuation"},{"text":" ","kind":"space"},{"text":"never","kind":"keyword"},{"text":">","kind":"punctuation"}],"documentation":[],"codeActions":[{"description":"Import 'Flex' from module \"./components\"","changes":[{"fileName":"/Users/matb/projects/san/index.ts","textChanges":[{"start":{"line":1,"offset":1},"end":{"line":1,"offset":1},"newText":"import { Flex } from \"./components\";\n\n"}]}]}],"source":[{"text":"./components","kind":"text"}]}]}
Playground Link:
Related Issues:
simple TS project
uses
styled-components
right now these appear to be mutually exclusive statements XD
simple TS project
uses
styled-componentsright now these appear to be mutually exclusive statements XD
Hahahahaha, it's simple, for now ποΈ
I have just decided to not upgrade VSC as my delay is often many seconds. It makes one of the main value propositions of the IDE unusable unless you stick on <=February
I have just decided to not upgrade VSC as my delay is often many seconds. It makes one of the main value propositions of the IDE unusable unless you stick on <=February
@johnculviner you mean vscode <= feb?
@jordyvandomselaar this is the version I'm stuck on to get acceptable performance

I have downgraded to the February version by simply installing over the new version and am still facing the issue. Is there anything else I have forgotten to do? This is really impeding my work at the moment.
@markonyango that did it for me. Make sure to turn off auto updates though or you are right on the new version again!

Thanks for the replies @markonyango @johnculviner, I see @ahejlsberg has anded the "Fixed" label so all that's left is hoping for the best =), I've installed the Insiders edition as someone else noted that might help as well.
Thanks for fixing this issue guys!
Yeah thats pretty awesome when the father of C# and Typescript fixes your issue! :)
β€οΈβ€οΈβ€οΈβ€οΈβ€οΈ OPEN SOURCE!
Did insiders help? @jordyvandomselaar
Most helpful comment
Thanks for the replies @markonyango @johnculviner, I see @ahejlsberg has anded the "Fixed" label so all that's left is hoping for the best =), I've installed the Insiders edition as someone else noted that might help as well.
Thanks for fixing this issue guys!