D
Deno
A
Deno
β’
2y ago
β’
26 replies
abi
Type-narrowing/covariance/contravariance
Why is it that
5
5
has type
5
5
but
{five:5}
{five:5}
has type
{five:number}
{five:number}
and not
{five:5}
{five:5}
?
Deno
Join
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,974
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
5
5
5
5
{five:5}
{five:5}
{five:5}
{five:5}
{five:number}
{five:number}
Similar Threads
Simple type narrowing/type guard/assertion (?)
A
abi / help
3y ago
Deno KV Type narrowing issue
W
whaley / help
5mo ago
Deno LSP not narrowing types
B
Bread / help
6mo ago
Type alias with inherited type parameter constraints
A
abi / help
3y ago