UNPKG

@stadiamaps/ferrostar-webcomponents

Version:

Ferrostar is a modern SDK for building turn-by-turn navigation applications.

26 lines 729 B
import { TripState } from '@stadiamaps/ferrostar'; export interface StateProvider { /** * Emits a navigation event. * @param tripState The current trip state. * * Example declaration: * ```typescript * provideState(tripState: TripState) { * this.dispatchEvent( * new CustomEvent("tripstate-update", { * detail: { tripState }, * bubbles: true, * }), * ); * } * ``` */ provideState(tripState: TripState): void; addEventListener(type: string, callback: (event: CustomEvent) => void): unknown; /** * Optional callback for when navigation stops. */ stopNavigation?(): void; } //# sourceMappingURL=types.d.ts.map