-
Notifications
You must be signed in to change notification settings - Fork 29.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test: downloadAndUnzipVSCode could have a constant overload 'insiders' #76091
Comments
Same for other places where this can be done, e.g. |
@octref Can you please share the function declaration you are using? |
@mjbvz Simple repro: function downloadVSCodeArchive(version: string | 'foo') {}
downloadVSCodeArchive('|') // do completion here I'm on TS 3.5.2. |
Thanks. TS will reduce the type to the common |
@mjbvz Found upstream issue: microsoft/TypeScript#29729 Apparently this works: type StringLiteralUnion<T extends U, U = string> = T | (U & { });
type DownloadVersion = StringLiteralUnion<'insiders' | 'stable'>; I'll add |
Refs: #76039
export declare function downloadAndUnzipVSCode(version?: string | 'insiders'): Promise<string>;
The text was updated successfully, but these errors were encountered: