declare module 'motorway'{ export = Motorway interface Runner{ /** End this action and rejoin the Motorway */ rejoin(): void } class Motorway{ constructor() /** Add a new junction to the motorway runAfter is an array of junction names that need to finish before this junction can run */ addJunction(junctionName: string, runAfter?: string[]): void /** Add an action to the named junction */ addAction(junctionMame: string, func: (this: Runner) => void): void /** Load a junction from the given file path */ loadJunction(path: string): void /** Drop the junction fromt he Motorway */ dropJunction(junctionName: string): void /** Starts the motorway at the given junction */ start(junctionName: string): void /** Replaces the junction with the new one */ replaceJunction(oldJunctionName: string, newJunctionName: string): void } }