Check out this module:
export module Example{
let client : any;
export function myExample(customer: string) {
// How can I access the variable "client" at the module level inside this function?
// Should I consider using Pascal Case for module-level variables to avoid conflicts like this?
}
}
The customer
in the myExample
function is a string. How do I refer to the module-level client
?
If it were a class, I could use this.customer
, but that doesn't work in a module context. Also, Example.customer
won't work unless the customer variable is exported...