Despite following instructions provided in this particular answer, I am struggling to get the solution to work as intended.
Summary
My objective is to utilize import { Type } from "Module"
instead of
/// <reference path="..." />
Layout
-app\
-ViewModel.ts
-Program.ts
ViewModel.ts
export module Demo {
export class ViewModel {
constructor(public test: string) {
}
}
}
Program.ts
import { ViewModel } from "ViewModel";
The module 'C:/DemoApp/app/ViewModel' does not have a exported member named 'ViewModel'.
Furthermore...
Only 'amd' and 'system' modules can be used alongside --outFile.
Objective
My goal is to effectively reference dependencies so that they compile into a single file sequentially.
Even after adding "module": "system"
, the initial error persists.
In line with the first solution, I wish to retain namespaces without any compromise.