Skip to main content
Version: Annotations-V1.0.0

FrostEntity

@frost/frost-web / Exports / FrostEntity

Function: FrostEntity

FrostEntity(options): <T>(constructor: T) => void

This decorator allows you to declare a class as a node in FirebaseDB and provide the path for it

This decorator is used to mark classes that extend FrostObject

Decorator

Example

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

Parameters

NameTypeDescription
optionsFrostEntityDecoratorOptionsEntity Options

Returns

fn

▸ <T>(constructor): void

Type parameters
NameType
Textends (...args: any[]) => FrostObject<{ id?: string }>
Parameters
NameType
constructorT
Returns

void