@datorama/akita-ngdevtools
Version:
Akita integration for Redux dev-tools chrome extension
62 lines (58 loc) • 2.64 kB
JavaScript
import * as i0 from '@angular/core';
import { InjectionToken, Injectable, Inject, APP_INITIALIZER, NgModule } from '@angular/core';
import { akitaDevtools } from '@datorama/akita';
const DEVTOOLS_OPTIONS = new InjectionToken('DevtoolsOptions');
class AkitaDevtools {
constructor(ngZone, options) {
this.ngZone = ngZone;
this.options = options;
akitaDevtools(this.ngZone, this.options);
}
}
AkitaDevtools.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: AkitaDevtools, deps: [{ token: i0.NgZone }, { token: DEVTOOLS_OPTIONS }], target: i0.ɵɵFactoryTarget.Injectable });
AkitaDevtools.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: AkitaDevtools, providedIn: 'root' });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: AkitaDevtools, decorators: [{
type: Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: function () { return [{ type: i0.NgZone }, { type: undefined, decorators: [{
type: Inject,
args: [DEVTOOLS_OPTIONS]
}] }]; } });
// auto initialize the devtools
function d() { }
function init(akitaDevtools) {
return d;
}
class AkitaNgDevtools {
static forRoot(options) {
return {
ngModule: AkitaNgDevtools,
providers: [
{
provide: DEVTOOLS_OPTIONS,
useValue: options
},
{
provide: APP_INITIALIZER,
useFactory: init,
deps: [AkitaDevtools],
multi: true
}
]
};
}
}
AkitaNgDevtools.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: AkitaNgDevtools, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
AkitaNgDevtools.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: AkitaNgDevtools });
AkitaNgDevtools.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: AkitaNgDevtools });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: AkitaNgDevtools, decorators: [{
type: NgModule,
args: [{}]
}] });
/**
* Generated bundle index. Do not edit.
*/
export { AkitaDevtools, AkitaNgDevtools, DEVTOOLS_OPTIONS, d, init };
//# sourceMappingURL=datorama-akita-ngdevtools.mjs.map