Рассмотрим этот модуль:
export module Example{
let customer : any;
export function myExample(customer: string) {
// How to reference the module level customer object here?
// Is there a standard to make these module level variables Pascal Case to prevent this overlap?
}
}
customer
в функции myExample
— это строка. Как мне сослаться на уровень модуля customer
?
Если бы это был класс, я мог бы использовать this.customer
, но this
не работает в модуле, и Example.customer
тоже не работает, если клиент не экспортируется...