Repository navigation
Move local type definitions out of flow-typed - #7031
Conversation
|
Note also that I replaced our GeoJSON declarations with https://github.com/bigslycat/flow-geojson, which seems like a pretty well-written set of Flow types for GeoJSON -- this was primarily motivated by wanting |
|
Eh, I'm not a fan of those GeoJSON definitions. They're much more complicated than is necessary, and there are at least a couple of issues (feature geometry should be nullable, Edit: also properties should not be nullable. |
|
Dang, I missed those. Alright, alternative: we could keep the ones we had and publish them as a separate npm pacakge |
@jfirebaugh looks like the spec allows null for
|
Remaining declarations in flow-typed/ are exclusively for external dependencies
519c780 to
33b3d62
Compare
|
@jfirebaugh updated |
| @@ -1,4 +1,6 @@ | |||
| import type Pbf from 'pbf'; | |||
| import type Point from '@mapbox/point-geometry'; | |||
| import type { Feature } from 'flow-geojson'; | |||
There was a problem hiding this comment.
Switch to @mapbox/geojson-types.
| "execcommand-copy": "^1.1.0", | ||
| "flow-bin": "^0.69.0", | ||
| "flow-coverage-report": "^0.3.0", | ||
| "flow-geojson": "^2.0.6", |
| import type {Callback} from '../types/callback'; | ||
| import type {PerformanceResourceTiming} from '../types/performance_resource_timing'; | ||
| import type {GeoJSON, GeoJSONFeature} from '@mapbox/geojson-types'; | ||
| import type {GeojsonSourceSpecification} from '../style-spec/types'; |
There was a problem hiding this comment.
Let's special-case the generator so "GeoJSON" is capitalized consistently. (Looks like it already has a special-case for "DEM".)
Prepares for #6963