Repository navigation
Some signatures should use union instead of overloads #5766
Description
Activity
Agreed, we should fix the declaration of
splitto take a union type for the first parameter.- addedSuggestionAn idea for TypeScriptAn idea for TypeScript
on Nov 24, 2015 falsandtru commented
on Nov 24, 2015 ContributorAuthorMore actionsThanks! Should I create a list of all integration targets? Such as String#match/replace/search, and more many types. This is steady manual works.
- addedHelp WantedYou can do thisYou can do thisDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScript
on Nov 24, 2015 RyanCavanaugh commented
on Nov 24, 2015 MemberMore actionsIt's probably worth having a script or something to find these cases.
Unfortunately we can't perform this merging on the type system side because the two forms (two overloads vs one overload with a union) actually have rather different semantics in practice.
falsandtru commented
on Nov 25, 2015 ContributorAuthorMore actionsAll right, I'll leave it up to you.
falsandtru commented
on Jan 15, 2016 ContributorAuthorMore actionsWhen TypeScript fixes this issue? I want to fix this issue myself partially if TypeScript doesn't fix this issue until next version 1.8.
falsandtru (@falsandtru) feel free to send a PR for the issue.
falsandtru commented
on Jan 16, 2016 ContributorAuthorMore actionsMohamed Hegazy (@mhegazy) thanks, I'll fix it.
- changed the title
[-]Integrate overloads into union types[/-][+]`String.split` signature should use union instead of overloads[/+]on Dec 14, 2016 - added a commit that references this issue
on Jan 29, 2017 - addedFixedA PR has been merged for this issueA PR has been merged for this issue
on Mar 13, 2017 - locked and limited conversation to collaborators
on Jun 19, 2018
I think, this code should be correct code by fixes of lib.d.ts or type system.
Manual: Replace to union types
Resolve by type definition.
from:
to:
Automatic: Generate union types
Resolve by auto generated merged signature from overloads.
from:
Generate the merged signature internally, implicitly.
to: