I use node.js 7.44.
In file user.models.ts I have multilplie classes like:
import { Exclude, Expose } from "class-transformer";
export class User {
@Expose() _id: string;
@Expose() fname: string;
@Expose() lname: string;
@Expose() birthday: Date;
@Expose() address: Address;
constructor(){...}
}
@Exclude()
export class Address {
@Expose() street: string;
@Expose() num: number;
@Expose() city: string;
@Expose() zipCode: number;
}
when I compile the server I get Error ReferenceError: Adress is not defined
how can I use multilplie classes at same file?
via eran hadad
No comments:
Post a Comment