-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
FixedA PR has been merged for this issueA PR has been merged for this issueNeeds ProposalThis issue needs a plan that clarifies the finer details of how it could be implemented.This issue needs a plan that clarifies the finer details of how it could be implemented.SuggestionAn idea for TypeScriptAn idea for TypeScript
Milestone
Description
From #11054
interface FolderContentItem{
type: 'folder' | 'file';
}
let a:FolderContentItem[] = [];
a = [1,2,3,4,5].map(v=>({type:'folder'}))
Today this is an error without casting "folder"
to the literal type. We have a contextual type coming from a
that is not being used.
aluanhaddad, HerringtonDarkholme, johnnyreilly, tinganho, gcnew and 29 more
Metadata
Metadata
Assignees
Labels
FixedA PR has been merged for this issueA PR has been merged for this issueNeeds ProposalThis issue needs a plan that clarifies the finer details of how it could be implemented.This issue needs a plan that clarifies the finer details of how it could be implemented.SuggestionAn idea for TypeScriptAn idea for TypeScript