I used Typewriter to create an typescript class from my C# code. When I try to reference it in my angular project via import it says module does not exist or namespace not recognized if I use namespace.
What is the proper way to add class to my project so I can use it in other files?
module Budget.Infrastructure.Model {
// $Classes/Enums/Interfaces(filter)[template][separator]
// filter (optional): Matches the name or full name of the current item. * = match any, wrap in [] to match attributes or prefix with : to match interfaces or base classes.
// template: The template to repeat for each matched item
// separator (optional): A separator template that is placed between all templates e.g. $Properties[public $name: $Type][, ]
// More info: http://frhagn.github.io/Typewriter/
export class User {
// ID
public id: string = null;
// FIRSTNAME
public firstName: string = null;
// LASTNAME
public lastName: string = null;
// EMAIL
public email: string = null;
}
}
you have to export the module
and you can import like this