I have a document that includes a module structured as follows
ROOT/database/models.ts
module Model {
export interface Inbox {
title: string;
msg: string;
}
export interface User{
Id: string;
Name: string;
}
}
I am trying to access these interfaces from the main file. Here is what I attempted
ROOT/pages/main.ts
import { Model} from '../database/models'; //<-- this is where I face an issue
export class WorkerPostbidPage {
myinbox:Model.Inbox; // <-- and I want to refer to it like this
TestMethod() {
this.myinbox = {
title:"new message",
msg:"you have an alert"
}
}
}
However, when I manually paste the model content into the index.ts file, everything works smoothly
module Model {
export interface Inbox {
title: string;
msg: string;
}
export interface User{
Id: string;
Name: string;
}
}
export class WorkerPostbidPage {
myinbox:Model.Inbox; // <-- and I want to refer to it like this
TestMethod() {
this.myinbox = {
title:"new message",
msg:"you have an alert"
}
}
}
I believe there might be a mistake on my end, or perhaps I am overlooking some components