Function: Model()
function Model<T>(target: T, context: ClassDecoratorContext<T>): T;
Defined in: src/data-management/decorators/model.ts:50
Type Parameters
| Type Parameter |
|---|
T extends (…args: any[]) => { } |
Parameters
| Parameter | Type |
|---|---|
target |
T |
context |
ClassDecoratorContext<T> |
Returns
T
Model
- Decorador de clase para modelos de datos
Example
Model
class User {
Id
id: string;
Prop
name: string;
constructor(id: string, name: string) { this.id = id; this.name = name; } }
// Ahora el Store sabe sobre User const user = new User(“1”, “Julian”); store.set(User, user);