How do I use the return type of a function with overloads that will be returned in the same function

I'm creating a library, but I have a problem when I use a function with overloads to return itself in some instances. It won't be able to determine the right type.
Solution:
DominicVonk
CodeSandbox
fast-rain-pyixhv - CodeSandbox
fast-rain-pyixhv by DominicVonk using parcel-bundler
Jump to solution
4 Replies
dominicv
dominicvOP2y ago
DominicVonk
CodeSandbox
distracted-payne-1fe5fm - CodeSandbox
distracted-payne-1fe5fm by DominicVonk using parcel-bundler
dominicv
dominicvOP2y ago
This is the with the isse:
Solution
dominicv
dominicv2y ago
DominicVonk
CodeSandbox
fast-rain-pyixhv - CodeSandbox
fast-rain-pyixhv by DominicVonk using parcel-bundler
Want results from more Discord servers?
Add your server