TIL about typescript typing `as const`
I knew that typescript supports a type being a specific string, rather than the string type, so (for example) a function parameter can only receive the string “foo” and not a different string. Today I learnt that this can be done by using the as cons...
techblog.timhilton.xyz1 min read