π Search Terms
type named undefined
π Version & Regression Information
- This is the behavior in every version I tried, and I reviewed the FAQ
β― Playground Link
Playground Link
π» Code
namespace ns {
export type undefined = "";
export function x(p: undefined): undefined { // global undefined
}
}
function x(p: ns.undefined) { // undefined from the namespace
}
π Actual behavior
Inside the namespace undefined is the global undefined type. We can access the type if we qualify it with the namespace
π Expected behavior
undefined should not be allowed as a type name. (null is not)
Additional information about the issue
No response
π Search Terms
type named undefined
π Version & Regression Information
β― Playground Link
Playground Link
π» Code
π Actual behavior
Inside the namespace
undefinedis the globalundefinedtype. We can access the type if we qualify it with the namespaceπ Expected behavior
undefinedshould not be allowed as a type name. (nullis not)Additional information about the issue
No response