-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Closed
Labels
QuestionAn issue which isn't directly actionable in codeAn issue which isn't directly actionable in code
Description
I am using typescript 1.5 and common js modules type and when i declare my class inside module i get this error:
client/js/main.ts(4,9): Error TS2305: Module '"client/js/routeController"' has no exported member 'RouteController'.
routeController:
export module myApp {
export class RouteController {
$router: any;
constructor($router) {
this.$router = $router;
$router.config([
{ path: '/', component: 'home' }
]);
}
}
}main:
import {RouteController} from './routeController';But when i remove the module and doing this:
class RouteController {
$router: any;
constructor($router) {
this.$router = $router;
$router.config([
{ path: '/', component: 'home' }
]);
}
}
export default RouteController;this is working. what is the problem?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
QuestionAn issue which isn't directly actionable in codeAn issue which isn't directly actionable in code