0.0.2 • Published 6 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 --save
or
yarn add und-base-entity
Usage
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 test
or
yarn test
Lint
npm run lint
or
yarn lint