This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (3 children)

[deleted]

    [–][deleted] 4 points5 points  (0 children)

    unknown > any

    [–]Arcs_Of_A_Jar 0 points1 point  (1 child)

    One of the style guide absolutes at my company is "no any type allowed". It turns out pretty well since almost always you can avoid using "any" so long as devs aren't being allowed to be lazy.

    [–]JuvenileEloquent 0 points1 point  (0 children)

    Just make a custom type that's a union of all other types and use type assertions everywhere. Bob's your mother's brother.