(appFn: HandlerFactory)
| 142 | } |
| 143 | |
| 144 | public async loadHandlerFactory(appFn: HandlerFactory) { |
| 145 | await this.#initialize(); |
| 146 | |
| 147 | const handler = await appFn(this.#state.probot!, { |
| 148 | cwd: this.#state.cwd, |
| 149 | addHandler: (handler: Handler) => { |
| 150 | this.addHandler(handler as unknown as Handler); |
| 151 | }, |
| 152 | }); |
| 153 | |
| 154 | this.addHandler(handler); |
| 155 | } |
| 156 | |
| 157 | public async load(appFn: ApplicationFunction) { |
| 158 | await this.#initialize(); |