diff --git a/flow-typed/gl.js b/flow-typed/gl.js deleted file mode 100644 index 7fe9f46faa..0000000000 --- a/flow-typed/gl.js +++ /dev/null @@ -1,5 +0,0 @@ -// @flow strict -declare module "gl" { - declare function gl(width: number, height: number, attributes: WebGLContextAttributes): WebGLRenderingContext; - declare module.exports: typeof gl; -} diff --git a/flow-typed/jsdom.js b/flow-typed/jsdom.js deleted file mode 100644 index d9aa8c4080..0000000000 --- a/flow-typed/jsdom.js +++ /dev/null @@ -1,18 +0,0 @@ -// @flow strict - -import type Window from '../src/types/window'; - -declare module "jsdom" { - declare class JSDOM { - constructor(content: string, options: Object): JSDOM; - window: Window; - } - declare class VirtualConsole { - constructor(): VirtualConsole; - sendTo(console: typeof console): VirtualConsole; - } - declare module.exports: { - JSDOM: typeof JSDOM, - VirtualConsole: typeof VirtualConsole - }; -} diff --git a/flow-typed/mapbox-gl-supported.js b/flow-typed/mapbox-gl-supported.js deleted file mode 100644 index 71c3430c94..0000000000 --- a/flow-typed/mapbox-gl-supported.js +++ /dev/null @@ -1,9 +0,0 @@ -// @flow -'use strict'; -declare module "@mapbox/mapbox-gl-supported" { - declare type isSupported = { - (options?: {failIfMajorPerformanceCaveat: boolean}): boolean, - webGLContextAttributes: WebGLContextAttributes - }; - declare module.exports: isSupported; -} diff --git a/flow-typed/mapbox-unitbezier.js b/flow-typed/mapbox-unitbezier.js deleted file mode 100644 index cb127d13a2..0000000000 --- a/flow-typed/mapbox-unitbezier.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; -// @flow - -declare module "@mapbox/unitbezier" { - declare class UnitBezier { - constructor(p1x: number, p1y: number, p2x: number, p2y: number): UnitBezier; - sampleCurveX(t: number): number; - sampleCurveY(t: number): number; - sampleCurveDerivativeX(t: number): number; - solveCurveX(x: number, epsilon: number | void): number; - solve(x: number, epsilon: number | void): number; - } - declare module.exports: typeof UnitBezier; -} diff --git a/flow-typed/offscreen-canvas.js b/flow-typed/offscreen-canvas.js deleted file mode 100644 index 6c9617dad1..0000000000 --- a/flow-typed/offscreen-canvas.js +++ /dev/null @@ -1,9 +0,0 @@ -// @flow strict - -declare class OffscreenCanvas { - width: number; - height: number; - - constructor(width: number, height: number): OffscreenCanvas; - getContext(contextType: '2d'): CanvasRenderingContext2D; -} diff --git a/flow-typed/pbf.js b/flow-typed/pbf.js deleted file mode 100644 index ca92463be8..0000000000 --- a/flow-typed/pbf.js +++ /dev/null @@ -1,25 +0,0 @@ -declare module "pbf" { - declare type ReadFunction = (tag: number, result: T, pbf: Pbf) => void; - - declare class Pbf { - constructor(buf?: ArrayBuffer | Uint8Array): Pbf; - - readFields(readField: ReadFunction, result: T, end?: number): T; - readMessage(readField: ReadFunction, result: T): T; - - readFixed32(): number; - readSFixed32(): number; - readFixed64(): number; - readSFixed64(): number; - readFloat(): number; - readDouble(): number; - readVarint(): number; - readVarint64(): number; - readSVarint(): number; - readBoolean(): boolean; - readString(): string; - readBytes(): Uint8Array; - } - - declare module.exports: typeof Pbf -} diff --git a/flow-typed/point-geometry.js b/flow-typed/point-geometry.js deleted file mode 100644 index 38f7a8b85e..0000000000 --- a/flow-typed/point-geometry.js +++ /dev/null @@ -1,44 +0,0 @@ -declare module "@mapbox/point-geometry" { - declare type PointLike = Point | [number, number]; - - declare class Point { - x: number; - y: number; - constructor(x: number, y: number): Point; - clone(): Point; - add(point: Point): Point; - sub(point: Point): Point; - multByPoint(point: Point): Point; - divByPoint(point: Point): Point; - mult(k: number): Point; - div(k: number): Point; - rotate(angle: number): Point; - rotateAround(angle: number, point: Point): Point; - matMult(matrix: [number, number, number, number]): Point; - unit(): Point; - perp(): Point; - round(): Point; - mag(): number; - equals(point: Point): boolean; - dist(point: Point): number; - distSqr(point: Point): number; - angle(): number; - angleTo(point: Point): number; - angleWith(point: Point): number; - angleWithSep(x: number, y: number): number; - _matMult(matrix: [number, number, number, number]): Point; - _add(point: Point): Point; - _sub(point: Point): Point; - _mult(k: number): Point; - _div(k: number): Point; - _multByPoint(point: Point): Point; - _divByPoint(point: Point): Point; - _unit(): Point; - _perp(): Point; - _rotate(angle: number): Point; - _rotateAround(angle: number, point: Point): Point; - _round(): Point; - static convert(a: PointLike): Point; - } - declare module.exports: typeof Point; -} diff --git a/flow-typed/potpack.js b/flow-typed/potpack.js deleted file mode 100644 index 48fe21c825..0000000000 --- a/flow-typed/potpack.js +++ /dev/null @@ -1,12 +0,0 @@ -declare module "potpack" { - declare type Bin = { - x: number, - y: number, - w: number, - h: number - }; - - declare function potpack(bins: Array): {w: number, h: number, fill: number}; - - declare module.exports: typeof potpack; -} diff --git a/flow-typed/sinon.js b/flow-typed/sinon.js deleted file mode 100644 index be0350bd52..0000000000 --- a/flow-typed/sinon.js +++ /dev/null @@ -1,28 +0,0 @@ -// @flow strict -declare module "sinon" { - declare type SpyCall = { - args: Array - }; - declare type Spy = { - (): any, - calledOnce: number, - getCall(i: number): SpyCall - }; - declare type Stub = { - callsFake(fn: mixed): Spy - }; - declare class FakeServer { - xhr: XMLHttpRequest - } - declare type Sandbox = { - xhr: {supportsCORS: boolean}, - fakeServer: {create: () => FakeServer}, - - createSandbox(options: mixed): Sandbox, - stub(obj?: mixed, prop?: string): Stub, - spy(obj?: mixed, prop?: string): Spy, - restore(): void; - }; - - declare module.exports: Sandbox; -} diff --git a/flow-typed/vector-tile.js b/flow-typed/vector-tile.js deleted file mode 100644 index a5f62c4a5f..0000000000 --- a/flow-typed/vector-tile.js +++ /dev/null @@ -1,40 +0,0 @@ -import type Pbf from 'pbf'; -import type Point from '@mapbox/point-geometry'; - -declare interface VectorTile { - layers: {[_: string]: VectorTileLayer}; -} - -declare interface VectorTileLayer { - version?: number; - name: string; - extent: number; - length: number; - feature(i: number): VectorTileFeature; -} - -declare interface VectorTileFeature { - extent: number; - type: 1 | 2 | 3; - id: number; - properties: {[_: string]: string | number | boolean}; - - loadGeometry(): Array>; - toGeoJSON(x: number, y: number, z: number): GeoJSON.Feature; -} - -declare module "@mapbox/vector-tile" { - declare class VectorTileImpl { - constructor(pbf: Pbf): VectorTile; - } - - declare class VectorTileFeatureImpl { - static types: ['Unknown', 'Point', 'LineString', 'Polygon']; - toGeoJSON(x: number, y: number, z: number): GeoJSON.Feature; - } - - declare module.exports: { - VectorTile: typeof VectorTileImpl; - VectorTileFeature: typeof VectorTileFeatureImpl; - } -}