-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
QuestionAn issue which isn't directly actionable in codeAn issue which isn't directly actionable in code
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?
JonasJasas
Metadata
Metadata
Assignees
Labels
QuestionAn issue which isn't directly actionable in codeAn issue which isn't directly actionable in code