I doing a MEAN app, but I want to define in my model user "_id" as mongodb/mongoose make it.
I want properties like " id" transparent as posible, the problem is " "
tslint variable name must be in lowercamelcase pascalcase or upper_case.
I try to do this:
export class MyModel {
"_id": string;
etc: etc;
etc: etc;
}
Aparently works, but I wold like some more transparent
If what you need is to fix the TS Lint error, then you could disable it for this specific block. Try the following
/* tslint:disable */
export class MyModel {
_id: string;
etc: etc;
etc: etc;
}
/* tslint:enable */
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.