Constructors
constructor
- new Store(options?: any): Store
-
Parameters
Properties
_type
_type: string
endpoints
endpoints: any
Protected entities
entities: any
isCollection
isCollection: boolean
isModel
isModel: boolean
isStore
isStore: boolean
Protected name
name: string
Protected trigger
trigger: trigger
Methods
close
-
Returns void
create
-
Parameters
destroy
- destroy(model: Model, options?: ModelDestroyOptions): void
-
Parameters
-
-
Optional options: ModelDestroyOptions
Returns void
fetch
- fetch(collection: Model, options: ModelFetchOptions): Promise<any>
- fetch(collection: Collection, options: CollectionFetchOptions): Promise<any>
-
Parameters
-
collection: Model
-
options: ModelFetchOptions
Returns Promise<any>
-
Parameters
-
-
options: CollectionFetchOptions
Returns Promise<any>
Protected handleError
- handleError(options: object, error: Error): any
-
Parameters
-
options: object
-
error: Error
Returns any
Protected handleSuccess
- handleSuccess(options: object, result: any): any
-
Parameters
-
options: object
-
result: any
Returns any
initCollection
- initCollection(collection: Collection, options?: any): void
-
Parameters
Returns void
initModel
- initModel(model: Model, options?: any): void
-
Parameters
Returns void
save
- save(model: Model, attributes?: any, options?: ModelSaveOptions): any
-
Parameters
-
-
Optional attributes: any
-
Optional options: ModelSaveOptions
Returns any
sync
- sync(method: string, model: Model | Collection, options?: any): Promise<any>
-
Parameters
-
method: string
-
-
Optional options: any
Returns Promise<any>
base class to build a custom data store.