minotor
Version:
A lightweight client-side transit routing library.
48 lines (47 loc) • 1.91 kB
TypeScript
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
export declare const protobufPackage = "minotor.stops.v1";
export declare enum LocationType {
LOCATION_TYPE_UNSPECIFIED = 0,
LOCATION_TYPE_SIMPLE_STOP_OR_PLATFORM = 1,
LOCATION_TYPE_STATION = 2,
LOCATION_TYPE_ENTRANCE_EXIT = 3,
LOCATION_TYPE_GENERIC_NODE = 4,
LOCATION_TYPE_BOARDING_AREA = 5,
UNRECOGNIZED = -1
}
export declare function locationTypeFromJSON(object: any): LocationType;
export declare function locationTypeToJSON(object: LocationType): string;
export interface Stop {
name: string;
sourceStopId?: string | undefined;
lat?: number | undefined;
lon?: number | undefined;
children: number[];
parent?: number | undefined;
locationType: LocationType;
platform?: string | undefined;
}
export interface StopsMap {
stops: Stop[];
}
export declare const Stop: MessageFns<Stop>;
export declare const StopsMap: MessageFns<StopsMap>;
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
[K in keyof T]?: DeepPartial<T[K]>;
} : Partial<T>;
type KeysOfUnion<T> = T extends T ? keyof T : never;
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
[K in keyof P]: Exact<P[K], I[K]>;
} & {
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
};
export interface MessageFns<T> {
encode(message: T, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): T;
fromJSON(object: any): T;
toJSON(message: T): unknown;
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
}
export {};