0.0.2 • Published 7 years ago
und-base-entity v0.0.2
Base Entity
This module helps us reduce our code as it avoids the use of setters and getters. It also implements the concept of introspection.
Installation
npm install und-base-entity --saveor
yarn add und-base-entityUsage
import { BaseEntity } from "und-base-entity";
import { attribute } from "und-base-entity";
class TestEntity extends BaseEntity {
@attribute(true, () => {
return "default";
})
private firstName: string;
@attribute(true)
private lastName: string;
public getFirstName(): string {
return this.firstName;
}
public getLastName(): string {
return this.lastName;
}
}Test
npm run testor
yarn testLint
npm run lintor
yarn lint