Skip to content

Type conversion precedence #2885

Answered by josdejong
WesleyKapow asked this question in Q&A
Discussion options

You must be logged in to vote

You'll indeed have to have the type check for Color before testing string, because all colors are also strings. Looking at the API of typed-function, I see the typed.addType function doesn't allow this kind of ordering, but I think you can use typed.addTypes(types, before) where you can specify before as "string".

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@WesleyKapow
Comment options

Answer selected by WesleyKapow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants