Why does 'instanceof' in TypeScript give me the error "'Foo' only refers to a type, but is being used as a value here."? Why does 'instanceof' in TypeScript give me the error "'Foo' only refers to a type, but is being used as a value here."? typescript typescript