Skip to content

Commit

Permalink
use relative import. fix object type
Browse files Browse the repository at this point in the history
  • Loading branch information
hanreev committed May 16, 2019
1 parent 935db5c commit 910574c
Show file tree
Hide file tree
Showing 288 changed files with 1,936 additions and 1,670 deletions.
7 changes: 4 additions & 3 deletions @types/ol/Collection.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { EventsKey } from 'ol/events';
import Event from 'ol/events/Event';
import BaseObject, { ObjectEvent } from 'ol/Object';
import { EventsKey } from './events';
import Event from './events/Event';
import BaseObject, { ObjectEvent } from './Object';

export class CollectionEvent<T> extends Event {
constructor();
element: T;
Expand Down
13 changes: 7 additions & 6 deletions @types/ol/Feature.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { EventsKey } from 'ol/events';
import Event from 'ol/events/Event';
import Geometry from 'ol/geom/Geometry';
import BaseObject, { ObjectEvent } from 'ol/Object';
import RenderFeature from 'ol/render/Feature';
import Style, { StyleFunction, StyleLike } from 'ol/style/Style';
import { EventsKey } from './events';
import Event from './events/Event';
import Geometry from './geom/Geometry';
import BaseObject, { ObjectEvent } from './Object';
import RenderFeature from './render/Feature';
import Style, { StyleFunction, StyleLike } from './style/Style';

export function createStyleFunction(obj: StyleFunction | Style[] | Style): StyleFunction;
export default class Feature extends BaseObject {
constructor(opt_geometryOrProperties?: Geometry | { [key: string]: any });
Expand Down
15 changes: 8 additions & 7 deletions @types/ol/Geolocation.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { Coordinate } from 'ol/coordinate';
import { EventsKey } from 'ol/events';
import Event from 'ol/events/Event';
import Polygon from 'ol/geom/Polygon';
import BaseObject, { ObjectEvent } from 'ol/Object';
import { ProjectionLike } from 'ol/proj';
import Projection from 'ol/proj/Projection';
import { Coordinate } from './coordinate';
import { EventsKey } from './events';
import Event from './events/Event';
import Polygon from './geom/Polygon';
import BaseObject, { ObjectEvent } from './Object';
import { ProjectionLike } from './proj';
import Projection from './proj/Projection';

export default class Geolocation extends BaseObject {
constructor(opt_options?: Options);
getProjection(): Projection;
Expand Down
11 changes: 6 additions & 5 deletions @types/ol/Graticule.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import LineString from 'ol/geom/LineString';
import Point from 'ol/geom/Point';
import PluggableMap from 'ol/PluggableMap';
import Stroke from 'ol/style/Stroke';
import Text from 'ol/style/Text';
import LineString from './geom/LineString';
import Point from './geom/Point';
import PluggableMap from './PluggableMap';
import Stroke from './style/Stroke';
import Text from './style/Text';

export default class Graticule {
constructor(opt_options?: Options);
getMap(): PluggableMap;
Expand Down
7 changes: 4 additions & 3 deletions @types/ol/Image.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Extent } from 'ol/extent';
import ImageBase from 'ol/ImageBase';
import ImageState from 'ol/ImageState';
import { Extent } from './extent';
import ImageBase from './ImageBase';
import ImageState from './ImageState';

export default class ImageWrapper extends ImageBase {
constructor(extent: Extent, resolution: number, pixelRatio: number, src: string, crossOrigin: string, imageLoadFunction: LoadFunction);
protected state: ImageState;
Expand Down
7 changes: 4 additions & 3 deletions @types/ol/ImageBase.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Target from 'ol/events/Target';
import { Extent } from 'ol/extent';
import ImageState from 'ol/ImageState';
import Target from './events/Target';
import { Extent } from './extent';
import ImageState from './ImageState';

export default class ImageBase extends Target {
constructor(extent: Extent, resolution: number, pixelRatio: number, state: ImageState);
protected extent: Extent;
Expand Down
5 changes: 3 additions & 2 deletions @types/ol/ImageCanvas.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Extent } from 'ol/extent';
import ImageBase from 'ol/ImageBase';
import { Extent } from './extent';
import ImageBase from './ImageBase';

export default class ImageCanvas extends ImageBase {
constructor(extent: Extent, resolution: number, pixelRatio: number, canvas: HTMLCanvasElement, opt_loader?: Loader);
getError(): Error;
Expand Down
7 changes: 4 additions & 3 deletions @types/ol/ImageTile.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Tile, { LoadFunction, Options } from 'ol/Tile';
import { TileCoord } from 'ol/tilecoord';
import TileState from 'ol/TileState';
import Tile, { LoadFunction, Options } from './Tile';
import { TileCoord } from './tilecoord';
import TileState from './TileState';

export default class ImageTile extends Tile {
constructor(tileCoord: TileCoord, state: TileState, src: string, crossOrigin: string, tileLoadFunction: LoadFunction, opt_options?: Options);
getImage(): HTMLCanvasElement | HTMLImageElement | HTMLVideoElement;
Expand Down
15 changes: 8 additions & 7 deletions @types/ol/Map.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { EventsKey } from 'ol/events';
import Event from 'ol/events/Event';
import MapBrowserEvent from 'ol/MapBrowserEvent';
import MapEvent from 'ol/MapEvent';
import { ObjectEvent } from 'ol/Object';
import PluggableMap, { MapOptions } from 'ol/PluggableMap';
import RenderEvent from 'ol/render/Event';
import { EventsKey } from './events';
import Event from './events/Event';
import MapBrowserEvent from './MapBrowserEvent';
import MapEvent from './MapEvent';
import { ObjectEvent } from './Object';
import PluggableMap, { MapOptions } from './PluggableMap';
import RenderEvent from './render/Event';

export default class Map extends PluggableMap {
constructor(options: MapOptions);
on(type: string | string[], listener: ((param0: any) => void)): EventsKey | EventsKey[];
Expand Down
9 changes: 5 additions & 4 deletions @types/ol/MapBrowserEvent.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { Coordinate } from 'ol/coordinate';
import MapEvent from 'ol/MapEvent';
import { Pixel } from 'ol/pixel';
import PluggableMap, { FrameState } from 'ol/PluggableMap';
import { Coordinate } from './coordinate';
import MapEvent from './MapEvent';
import { Pixel } from './pixel';
import PluggableMap, { FrameState } from './PluggableMap';

export default class MapBrowserEvent extends MapEvent {
constructor(type: string, map: PluggableMap, browserEvent: Event, opt_dragging?: boolean, opt_frameState?: FrameState);
coordinate: Coordinate;
Expand Down
5 changes: 3 additions & 2 deletions @types/ol/MapBrowserEventHandler.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Target from 'ol/events/Target';
import PluggableMap from 'ol/PluggableMap';
import Target from './events/Target';
import PluggableMap from './PluggableMap';

export default class MapBrowserEventHandler extends Target {
constructor(map: PluggableMap, moveTolerance?: number);
}
7 changes: 4 additions & 3 deletions @types/ol/MapBrowserPointerEvent.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import MapBrowserEvent from 'ol/MapBrowserEvent';
import PluggableMap, { FrameState } from 'ol/PluggableMap';
import PointerEvent from 'ol/pointer/PointerEvent';
import MapBrowserEvent from './MapBrowserEvent';
import PluggableMap, { FrameState } from './PluggableMap';
import PointerEvent from './pointer/PointerEvent';

export default class MapBrowserPointerEvent extends MapBrowserEvent {
constructor(type: string, map: PluggableMap, pointerEvent: PointerEvent, opt_dragging?: boolean, opt_frameState?: FrameState);
}
5 changes: 3 additions & 2 deletions @types/ol/MapEvent.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Event from 'ol/events/Event';
import PluggableMap, { FrameState } from 'ol/PluggableMap';
import Event from './events/Event';
import PluggableMap, { FrameState } from './PluggableMap';

export default class MapEvent extends Event {
constructor(type: string, map: PluggableMap, opt_frameState?: FrameState);
frameState: FrameState;
Expand Down
7 changes: 4 additions & 3 deletions @types/ol/Object.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { EventsKey } from 'ol/events';
import Event from 'ol/events/Event';
import Observable from 'ol/Observable';
import { EventsKey } from './events';
import Event from './events/Event';
import Observable from './Observable';

export function getChangeEventType(key: string): string;
export class ObjectEvent extends Event {
constructor();
Expand Down
7 changes: 4 additions & 3 deletions @types/ol/Observable.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { EventsKey } from 'ol/events';
import Event from 'ol/events/Event';
import Target from 'ol/events/Target';
import { EventsKey } from './events';
import Event from './events/Event';
import Target from './events/Target';

export function unByKey(key: EventsKey | EventsKey[]): void;
export default class Observable extends Target {
constructor();
Expand Down
21 changes: 11 additions & 10 deletions @types/ol/Overlay.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { Coordinate } from 'ol/coordinate';
import { EventsKey } from 'ol/events';
import Event from 'ol/events/Event';
import { Extent } from 'ol/extent';
import BaseObject, { ObjectEvent } from 'ol/Object';
import OverlayPositioning from 'ol/OverlayPositioning';
import { Pixel } from 'ol/pixel';
import PluggableMap from 'ol/PluggableMap';
import { Size } from 'ol/size';
import { Coordinate } from './coordinate';
import { EventsKey } from './events';
import Event from './events/Event';
import { Extent } from './extent';
import BaseObject, { ObjectEvent } from './Object';
import OverlayPositioning from './OverlayPositioning';
import { Pixel } from './pixel';
import PluggableMap from './PluggableMap';
import { Size } from './size';

export interface Options {
id?: number | string;
element?: HTMLElement;
Expand All @@ -26,7 +27,7 @@ export default class Overlay extends BaseObject {
protected autoPanMargin: number;
protected element: HTMLElement;
protected stopEvent: boolean;
protected rendered: { [key: string]: any };
protected rendered: any;
protected options: Options;
protected autoPanAnimation: PanOptions;
protected id: number | string;
Expand Down
49 changes: 25 additions & 24 deletions @types/ol/PluggableMap.d.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
import Collection from 'ol/Collection';
import Control from 'ol/control/Control';
import { Coordinate } from 'ol/coordinate';
import { EventsKey } from 'ol/events';
import Event from 'ol/events/Event';
import { Extent } from 'ol/extent';
import Feature, { FeatureLike } from 'ol/Feature';
import Interaction from 'ol/interaction/Interaction';
import BaseLayer from 'ol/layer/Base';
import LayerGroup from 'ol/layer/Group';
import Layer, { State as State_1 } from 'ol/layer/Layer';
import MapBrowserEvent from 'ol/MapBrowserEvent';
import MapEvent from 'ol/MapEvent';
import BaseObject, { ObjectEvent } from 'ol/Object';
import Overlay from 'ol/Overlay';
import { Pixel } from 'ol/pixel';
import RenderEvent from 'ol/render/Event';
import MapRenderer from 'ol/renderer/Map';
import { Size } from 'ol/size';
import Tile from 'ol/Tile';
import TileQueue from 'ol/TileQueue';
import TileRange from 'ol/TileRange';
import { Transform } from 'ol/transform';
import View, { State } from 'ol/View';
import Collection from './Collection';
import Control from './control/Control';
import { Coordinate } from './coordinate';
import { EventsKey } from './events';
import Event from './events/Event';
import { Extent } from './extent';
import Feature, { FeatureLike } from './Feature';
import Interaction from './interaction/Interaction';
import BaseLayer from './layer/Base';
import LayerGroup from './layer/Group';
import Layer, { State as State_1 } from './layer/Layer';
import MapBrowserEvent from './MapBrowserEvent';
import MapEvent from './MapEvent';
import BaseObject, { ObjectEvent } from './Object';
import Overlay from './Overlay';
import { Pixel } from './pixel';
import RenderEvent from './render/Event';
import MapRenderer from './renderer/Map';
import { Size } from './size';
import Tile from './Tile';
import TileQueue from './TileQueue';
import TileRange from './TileRange';
import { Transform } from './transform';
import View, { State } from './View';

export interface AtPixelOptions {
layerFilter: ((param0: Layer) => boolean);
hitTolerance?: number;
Expand Down
9 changes: 5 additions & 4 deletions @types/ol/Tile.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import Target from 'ol/events/Target';
import Projection from 'ol/proj/Projection';
import { TileCoord } from 'ol/tilecoord';
import TileState from 'ol/TileState';
import Target from './events/Target';
import Projection from './proj/Projection';
import { TileCoord } from './tilecoord';
import TileState from './TileState';

export type LoadFunction = ((param0: Tile, param1: string) => void);
export interface Options {
transition?: number;
Expand Down
9 changes: 5 additions & 4 deletions @types/ol/TileCache.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { EventsKey } from 'ol/events';
import Event from 'ol/events/Event';
import LRUCache from 'ol/structs/LRUCache';
import TileRange from 'ol/TileRange';
import { EventsKey } from './events';
import Event from './events/Event';
import LRUCache from './structs/LRUCache';
import TileRange from './TileRange';

export default class TileCache extends LRUCache<any> {
constructor(opt_highWaterMark?: number);
expireCache(usedTiles: { [key: string]: TileRange }): void;
Expand Down
9 changes: 5 additions & 4 deletions @types/ol/TileQueue.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { Coordinate } from 'ol/coordinate';
import Event from 'ol/events/Event';
import PriorityQueue from 'ol/structs/PriorityQueue';
import Tile from 'ol/Tile';
import { Coordinate } from './coordinate';
import Event from './events/Event';
import PriorityQueue from './structs/PriorityQueue';
import Tile from './Tile';

export type PriorityFunction = ((param0: Tile, param1: string, param2: Coordinate, param3: number) => number);
export default class TileQueue extends PriorityQueue<any> {
constructor(tilePriorityFunction: PriorityFunction, tileChangeCallback: (() => void));
Expand Down
5 changes: 3 additions & 2 deletions @types/ol/TileRange.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Size } from 'ol/size';
import { TileCoord } from 'ol/tilecoord';
import { Size } from './size';
import { TileCoord } from './tilecoord';

export function createOrUpdate(minX: number, maxX: number, minY: number, maxY: number, tileRange?: TileRange): TileRange;
export default class TileRange {
constructor(minX: number, maxX: number, minY: number, maxY: number);
Expand Down
23 changes: 12 additions & 11 deletions @types/ol/VectorImageTile.d.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import Event from 'ol/events/Event';
import FeatureFormat from 'ol/format/Feature';
import Layer from 'ol/layer/Layer';
import Projection from 'ol/proj/Projection';
import { OrderFunction } from 'ol/render';
import VectorTile_1 from 'ol/source/VectorTile';
import Tile, { LoadFunction, UrlFunction } from 'ol/Tile';
import { TileCoord } from 'ol/tilecoord';
import TileGrid from 'ol/tilegrid/TileGrid';
import TileState from 'ol/TileState';
import VectorTile from 'ol/VectorTile';
import Event from './events/Event';
import FeatureFormat from './format/Feature';
import Layer from './layer/Layer';
import Projection from './proj/Projection';
import { OrderFunction } from './render';
import VectorTile_1 from './source/VectorTile';
import Tile, { LoadFunction, UrlFunction } from './Tile';
import { TileCoord } from './tilecoord';
import TileGrid from './tilegrid/TileGrid';
import TileState from './TileState';
import VectorTile from './VectorTile';

export function defaultLoadFunction(tile: VectorTile, url: string): void;
export interface ReplayState {
dirty: boolean;
Expand Down
21 changes: 11 additions & 10 deletions @types/ol/VectorTile.d.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { Extent } from 'ol/extent';
import Feature, { FeatureLike } from 'ol/Feature';
import { FeatureLoader } from 'ol/featureloader';
import FeatureFormat from 'ol/format/Feature';
import Layer from 'ol/layer/Layer';
import Projection from 'ol/proj/Projection';
import ReplayGroup from 'ol/render/ReplayGroup';
import Tile, { LoadFunction, Options } from 'ol/Tile';
import { TileCoord } from 'ol/tilecoord';
import TileState from 'ol/TileState';
import { Extent } from './extent';
import Feature, { FeatureLike } from './Feature';
import { FeatureLoader } from './featureloader';
import FeatureFormat from './format/Feature';
import Layer from './layer/Layer';
import Projection from './proj/Projection';
import ReplayGroup from './render/ReplayGroup';
import Tile, { LoadFunction, Options } from './Tile';
import { TileCoord } from './tilecoord';
import TileState from './TileState';

export default class VectorTile extends Tile {
constructor(tileCoord: TileCoord, state: TileState, src: string, format: FeatureFormat, tileLoadFunction: LoadFunction, opt_options?: Options);
onLoad(features: Feature[], dataProjection: Projection, extent: Extent): void;
Expand Down
Loading

0 comments on commit 910574c

Please sign in to comment.