Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/k-yle/gtfs-types
🚂 Typescript definitions for the GTFS Standard
https://github.com/k-yle/gtfs-types
gtfs gtfs-realtime types
Last synced: about 2 months ago
JSON representation
🚂 Typescript definitions for the GTFS Standard
- Host: GitHub
- URL: https://github.com/k-yle/gtfs-types
- Owner: k-yle
- License: mit
- Created: 2020-05-13T03:39:25.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-08-23T03:42:29.000Z (over 1 year ago)
- Last Synced: 2024-04-23T19:06:17.945Z (8 months ago)
- Topics: gtfs, gtfs-realtime, types
- Language: TypeScript
- Size: 155 KB
- Stars: 10
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# gtfs-types
[![Build Status](https://github.com/k-yle/gtfs-types/workflows/build/badge.svg)](https://github.com/k-yle/gtfs-types/actions)
[![npm version](https://badge.fury.io/js/gtfs-types.svg)](https://badge.fury.io/js/gtfs-types)This package exposes TypeScript type definitions for the [GTFS](https://developers.google.com/transit/gtfs) Standard and the [GTFS Realtime](https://developers.google.com/transit/gtfs-realtime/reference) Standard.
# Usage
Install the package from npm:
```sh
npm install -D gtfs-types
```Usage:
```ts
import { Route } from "gtfs-types";const myRoute: Route = {
route_id: "abc123",
route_short_name: "24",
route_long_name: "Crofton Downs to Box Hill",
};
```If you use typescript 3.8+ you can also use the type-only import syntax:
```ts
import type { Route } from "gtfs-types";
```For a list of all types, see the [src](https://github.com/k-yle/gtfs-types/tree/master/src) folder.