My typescript class - with constructor - looks like
export class Message {
constructor(
public id: number = 0,
public message: string = '',
public fact: string = ''
) {
}
}
I'm able to create a new model of this class like
model = new Message(0, '', '');
How would I create a constructor for a new class with a nested inner class such as
export class Inventory {
inventoryKey: string;
inventory: {
createBy: string;
component: string;
url: string;
securityCredentials: string;
description: string;
createDt: string;
}
}
? Not sure what the syntax for the constructor would look like. Thanks for any advice.