GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — CFA for dependent parameters typed by generic constraints by ahejlsberg · Pull Request #48411 · microsoft/TypeScript Conversation
Member
Fixes #48345.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was an error while loading. Please reload this page.
|
Heya Anders Hejlsberg (@ahejlsberg), I've started to run the diff-based community code test suite on this PR at 44e8d72. You can monitor the build here. Update: The results are in! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Heya Anders Hejlsberg (@ahejlsberg), I've started to run the parallelized Definitely Typed test suite on this PR at 44e8d72. You can monitor the build here. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Heya Anders Hejlsberg (@ahejlsberg), I've started to run the abridged perf test suite on this PR at 44e8d72. You can monitor the build here. Update: The results are in! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Heya Anders Hejlsberg (@ahejlsberg), I've started to run the extended test suite on this PR at 44e8d72. You can monitor the build here. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Anders Hejlsberg (@ahejlsberg) Here they are:Comparison Report - main..48411
System
Hosts
Scenarios
Developer Information: |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Anders Hejlsberg (@ahejlsberg) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| const contextualSignature = getContextualSignature(func); | ||
| if (contextualSignature && contextualSignature.parameters.length === 1 && signatureHasRestParameter(contextualSignature)) { | ||
| const restType = getTypeOfSymbol(contextualSignature.parameters[0]); | ||
| const restType = getReducedApparentType(getTypeOfSymbol(contextualSignature.parameters[0])); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
A very easy fix indeed 😅
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
For test suite: function a<T extends 'a' | 'b'> (arg: T) { if (arg === 'a') { // Expected: 'a' // Got: T extends "a" | "b" arg } } |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
* upstream/main: (473 commits) Correct node used for isDefinition calculation (microsoft#48499) fix(48405): emit dummy members from a mapped type (microsoft#48481) CFA for dependent parameters typed by generic constraints (microsoft#48411) No contextual typing from return types for boolean literals (microsoft#48380) fix(47733): omit JSDoc comment template suggestion on node with existing JSDoc (microsoft#47748) Ensure that we copy empty NodeArrays during transform (microsoft#48490) Add a new compiler option `moduleSuffixes` to expand the node module resolver's search algorithm (microsoft#48189) feat(27615): Add missing member fix should work for type literals (microsoft#47212) Add label details to completion entry (microsoft#48429) Enable method signature completion for object literals (microsoft#48168) Fix string literal completions when a partially-typed string fixes inference to a type parameter (microsoft#48410) fix(48445): show errors on type-only import/export specifiers in JavaScript files (microsoft#48449) Fix newline inserted in empty block at end of formatting range (microsoft#48463) Prevent looking up symbol for as const from triggering an error (microsoft#48464) Revise accessor resolution logic and error reporting (microsoft#48459) fix(48166): skip checking module.exports in a truthiness call expression (microsoft#48337) LEGO: Merge pull request 48450 LEGO: Merge pull request 48436 fix(48031): show circularity error for self referential get accessor annotations (microsoft#48050) Revert "Fix contextual discrimination for omitted members (microsoft#43937)" (microsoft#48426) ...
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Control Flow Analysis for Dependent Parameters doesn't work when the parameters are generic
There was an error while loading. Please reload this page.