We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8908613 commit faa98b0Copy full SHA for faa98b0
src/types/AsyncInitializedService.ts
@@ -0,0 +1,12 @@
1
+/**
2
+ * Extend when declaring a service with asyncInitialization: true flag.
3
+ */
4
+export abstract class AsyncInitializedService {
5
+ public _initialized: Promise<any>;
6
+
7
+ constructor() {
8
+ this._initialized = this.initialize();
9
+ }
10
11
+ protected abstract initialize(): Promise<any>;
12
+}
0 commit comments