-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 |
flow-typed/vector-tile.js
Outdated
@@ -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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switch to @mapbox/geojson-types
.
package.json
Outdated
@@ -63,6 +64,7 @@ | |||
"execcommand-copy": "^1.1.0", | |||
"flow-bin": "^0.69.0", | |||
"flow-coverage-report": "^0.3.0", | |||
"flow-geojson": "^2.0.6", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove.
src/source/geojson_source.js
Outdated
@@ -13,6 +13,8 @@ import type Dispatcher from '../util/dispatcher'; | |||
import type Tile from './tile'; | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's special-case the generator so "GeoJSON" is capitalized consistently. (Looks like it already has a special-case for "DEM".)
Prepares for #6963