Permalink
Browse files

typos

  • Loading branch information...
antoniusostermann committed Jan 21, 2019
1 parent 2ca9d3a commit 6bf2164a1ab4a54ff2016a6fd107bf81afb5bc7e

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -52,7 +52,7 @@ export interface SessionFactory {
getCurrentSession(currentSessionAttributes?: any): Session;
}

/** Returns a function which execute the KillService and remove the current session. */
/** Returns a function which evolves to a promise; if fulfilled, the current session has been destroyed. Needed in response handlers. */
export type KillSessionPromise = () => Promise<void>;

/** Returns a session object describing the current session */
@@ -11,7 +11,7 @@ import { Hooks } from "../joined-interfaces";
import { BasicHandable } from "../unifier/response-handler";
import { ExecuteFiltersHook } from "./execute-filters-hook";
import { componentInterfaces } from "./private-interfaces";
import { ContextState, ContextStateProvider, Filter, MAIN_STATE_NAME, State } from "./public-interfaces";
import { ContextState, ContextStatesProvider, Filter, MAIN_STATE_NAME, State } from "./public-interfaces";
import { Runner } from "./runner";
import { StateMachine as StateMachineImpl } from "./state-machine";

@@ -116,7 +116,7 @@ export const descriptor: ComponentDescriptor = {
});

// Provider for context states. Returns array of states or empty array if no state is present.
bindService.bindGlobalService<ContextStateProvider>("current-context-states-provider").toProvider(context => {
bindService.bindGlobalService<ContextStatesProvider>("current-context-states-provider").toProvider(context => {
return async (): Promise<Array<{ instance: State.Required; name: string }>> => {
const factory = context.container.get<Function>(injectionNames.stateFactory);

@@ -164,7 +164,7 @@ export interface BeforeStateMachine {
export type AfterStateMachine = BeforeStateMachine;

/**
* Includes the state name and instance, returned by the context state provider
* Includes the state name and instance, returned by ContextStatesProvider
*/
export interface ContextState {
instance: State.Required;
@@ -173,4 +173,4 @@ export interface ContextState {
/**
* Returns a function for retrieving all context states.
*/
export type ContextStateProvider = () => Promise<ContextState[]>;
export type ContextStatesProvider = () => Promise<ContextState[]>;
@@ -8,14 +8,14 @@ import { injectionNames } from "../../injection-names";
import { clearContextMetadataKey } from "./decorators/clear-context-decorator";
import { stayInContextMetadataKey } from "./decorators/stay-in-context-decorator";
import { componentInterfaces } from "./private-interfaces";
import { ContextStateProvider, State, Transitionable } from "./public-interfaces";
import { ContextStatesProvider, State, Transitionable } from "./public-interfaces";

@injectable()
export class StateMachine implements Transitionable {
public intentHistory: Array<{ stateName: string; intentMethodName: string }> = [];

constructor(
@inject(injectionNames.current.contextStatesProvider) private getContextStates: ContextStateProvider,
@inject(injectionNames.current.contextStatesProvider) private getContextStates: ContextStatesProvider,
@inject(injectionNames.current.stateProvider) private getCurrentState: State.CurrentProvider,
@inject(injectionNames.stateNames) private stateNames: string[],
@inject(injectionNames.current.sessionFactory) private currentSessionFactory: CurrentSessionFactory,
@@ -65,7 +65,7 @@ export const injectionNames = {
*/
current: {
/**
* Inject an instance of @type {ContextStateProvider}
* Inject an instance of @type {ContextStatesProvider}
*/
contextStatesProvider: "core:state-machine:current-context-states-provider",
/**

0 comments on commit 6bf2164

Please sign in to comment.