I have a type named the same as a global type. Specifically, an Event.
I've put my Event inside a namespace, which makes referring to it outside the namespace easy, but inside the namespace I can't refer to the global (or standard) one.
namespace Dot {
export class Event {
// a thing happens between two parties; nothing to do with JS Event
}
function doStuff(e : Event) {
// Event is presumed to be a Dot.Event instead of usual JS event
// Unable to refer to global type?
}
}
function doStuff2(e : Event) {
// Use of regular Event type, cool
}
function doStuff3(e : Dot.Event) {
// Use of Dot event type, cool
}
I suspect this is simply not possible, but can this be confirmed? Any workarounds besides renaming the Dot.Event type?
Cheers