Skip to main content
Version: Annotations-V1.0.0

FrostNode

@frost/frost-web / Exports / FrostNode

Function: FrostNode

FrostNode<T, I>(options): <E>(constructor: E) => { prototype: __class<any, any, any> } & E

This decorator allows you to declare an api class and provide the FrostObject Class to it This decorator is used to mark classes that extend FrostApi<T extends FrostObject>

Decorator

Example

@FrostEntity({collectionPath : "/users"})
class User extends FrostObject {
...
}

@FrostNode({entity : User})
class UsersApi extends FrostApi<User> {
}

Type parameters

NameType
Textends FrostObject<{ id?: string }, T>
Iextends IFrostObject<T>

Parameters

NameTypeDescription
optionsObjectApi Options
options.entityIthe class that extends the FrostObject Class

Returns

fn

▸ <E>(constructor): { prototype: __class<any, any, any> } & E

Type parameters
NameType
Eextends (...args: any[]) => FrostApi<T>
Parameters
NameType
constructorE
Returns

{ prototype: __class<any, any, any> } & E