MCPcopy Index your code
hub / github.com/loopbackio/loopback-next / setState

Method setState

packages/core/src/application.ts:289–296  ·  view source on GitHub ↗

* Transition the application to a new state and emit an event * @param state - The new state

(state: string)

Source from the content-addressed store, hash-verified

287 * @param state - The new state
288 */
289 protected setState(state: string) {
290 const oldState = this._state;
291 this._state = state;
292 if (oldState !== state) {
293 this.emit('stateChanged', {from: oldState, to: this._state});
294 this.emit(state);
295 }
296 }
297
298 protected async awaitState(state: string) {
299 await once(this, state);

Callers 4

initMethod · 0.95
startMethod · 0.95
stopMethod · 0.95
bootMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected