I have a function that requires to pass a Node or the window object. My types for this function are:
function myFunc(node: Node | window): void; However, when I run this, it complains:
'window' refers to a value, but is being used as a type here.
Well I cannot argue with that, but thats what I need. How do I solve this in typescript?