Skip to content

Commit

Permalink
Move TileJson type to a file instead of a global type.
Browse files Browse the repository at this point in the history
  • Loading branch information
vicapow authored and jfirebaugh committed Nov 21, 2017
1 parent 72ccc6a commit 1fb68f3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions bench/benchmarks/layout.js
Expand Up @@ -18,6 +18,8 @@ const {
normalizeTileURL
} = require('../../src/util/mapbox');

import type {TileJSON} from '../../src/types/tilejson';

// Note: this class is extended in turn by the LayoutDDS benchmark.
module.exports = class Layout extends Benchmark {
glyphs: Object;
Expand Down
1 change: 1 addition & 0 deletions src/source/load_tilejson.js
Expand Up @@ -7,6 +7,7 @@ const normalizeURL = require('../util/mapbox').normalizeSourceURL;

import type {RequestTransformFunction} from '../ui/map';
import type {Callback} from '../types/callback';
import type {TileJSON} from '../types/tilejson';

module.exports = function(options: any, requestTransformFn: RequestTransformFunction, callback: Callback<TileJSON>) {
const loaded = function(err, tileJSON: any) {
Expand Down
4 changes: 3 additions & 1 deletion flow-typed/tilejson.js → src/types/tilejson.js
@@ -1,4 +1,6 @@
declare type TileJSON = {|
// @flow

export type TileJSON = {|
tilejson: '2.2.0' | '2.1.0' | '2.0.1' | '2.0.0' | '1.0.0',
name?: string,
description?: string,
Expand Down

0 comments on commit 1fb68f3

Please sign in to comment.