mapbox / mapbox/mapbox-gl-directions

TypeScript Definitions

Open
#265 1 comment 5 reactions 0 assignees View on GitHub
auto-triaged enhancement
Dominant language
JavaScript
Stars
255
Forks
130
PR merge metrics
No merged PRs in 30d

Description

I dont found any typescript definition file for ApiResponse here.
maybe like this?

```typescript
interface MapBoxDirections {
code: string
uuid: string
waypoints: {
distance: number
name: string
location: number[]
}[]
routes: {
distance: number
duration: number
geometry: {
coordinates: number[][]
type: string
}
legs: {
admins: {
iso_3166_1: string
iso_3166_1_alpha3: string
}[]
distance: number
duration: number
steps: []
summary: string
weight: number
}[]
weight: number
weight_name: string
}[]
}
```

Contributor guide

Open the contributing guide

Research direction

No file or test is named. Start by locating the ApiResponse usage and the plugin entry points, then compare the MapBoxDirections shape in the issue with the Mapbox Directions API response. Done means the relevant TypeScript definitions exist and describe the response fields accurately.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.