Closed
Description
tsc 1.8.0 beta
demo.ts
namespace NS_APP {
class Greeter {
greeting: string;
constructor(message: string) {
this.greeting = message;
}
greet() {
return "Hello, " + this.greeting;
}
}
}
namespace NS_APP {
class Demo {
constructor(private greeter: Greeter) {
}
}
}
tsc error prompt:
error TS2304: Cannot find name 'Greeter'.
I want Greeter
to be private/protected for same namespace, if I use export token, Greeter
is public for namespace NS_APP.
demo.ts
namespace NS_APP {
**export** class Greeter {
greeting: string;
constructor(message: string) {
this.greeting = message;
}
greet() {
return "Hello, " + this.greeting;
}
}
}
namespace NS_APP {
class Demo {
constructor(private greeter: Greeter) {
}
}
}
My question, can Typescript support 'partial' namespace in one or multiple file?