forked from angular/in-memory-web-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
in-memory-web-api.module.d.ts
18 lines (18 loc) · 1.02 KB
/
in-memory-web-api.module.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { Injector, ModuleWithProviders, Type } from '@angular/core';
import { XHRBackend } from '@angular/http';
import { InMemoryBackendConfigArgs, InMemoryBackendConfig, InMemoryDbService } from './in-memory-backend.service';
export declare function inMemoryBackendServiceFactory(injector: Injector, dbService: InMemoryDbService, options: InMemoryBackendConfig): XHRBackend;
export declare class InMemoryWebApiModule {
/**
* Prepare in-memory-web-api in the root/boot application module
* with class that implements InMemoryDbService and creates an in-memory database.
*
* @param {Type} dbCreator - Class that creates seed data for in-memory database. Must implement InMemoryDbService.
* @param {InMemoryBackendConfigArgs} [options]
*
* @example
* InMemoryWebApiModule.forRoot(dbCreator);
* InMemoryWebApiModule.forRoot(dbCreator, {useValue: {delay:600}});
*/
static forRoot(dbCreator: Type<InMemoryDbService>, options?: InMemoryBackendConfigArgs): ModuleWithProviders;
}