From a94659c1307a0c51d30dc52e0318e29edac9c548 Mon Sep 17 00:00:00 2001 From: Olivier Sechet Date: Fri, 9 Mar 2018 17:43:46 +0100 Subject: [PATCH] Fix strict-export-declare-modifiers lint --- types/openlayers/index.d.ts | 50 ++++++++++++++-------------- types/openlayers/openlayers-tests.ts | 4 +-- types/openlayers/tslint.json | 3 +- 3 files changed, 28 insertions(+), 29 deletions(-) diff --git a/types/openlayers/index.d.ts b/types/openlayers/index.d.ts index 88cacde1e3..d2d8956cfc 100644 --- a/types/openlayers/index.d.ts +++ b/types/openlayers/index.d.ts @@ -13,7 +13,7 @@ export as namespace ol; -interface GlobalObject { [key: string]: any; } +export interface GlobalObject { [key: string]: any; } /** * Error object thrown when an assertion failed. This is an ECMA-262 Error, @@ -1387,7 +1387,7 @@ export namespace events { } /* From ol/typedefs.js */ -type EventsListenerFunctionType = ((evt: ol.events.Event) => void) | ((evt: ol.events.Event) => boolean); +export type EventsListenerFunctionType = ((evt: ol.events.Event) => void) | ((evt: ol.events.Event) => boolean); export namespace extent { /** @@ -11415,7 +11415,7 @@ export class View extends Object { } export namespace olx { - export namespace animation { + namespace animation { interface BounceOptions { resolution: number; start?: number; @@ -11465,7 +11465,7 @@ export namespace olx { type AnimateCallback = (completed: boolean) => void; } - export namespace control { + namespace control { interface AttributionOptions { className?: string; target?: Element; @@ -11570,7 +11570,7 @@ export namespace olx { } } - export namespace format { + namespace format { interface ReadOptions { dataProjection: ol.ProjectionLike; featureProjection: ol.ProjectionLike; @@ -11681,7 +11681,7 @@ export namespace olx { } } - export namespace interaction { + namespace interaction { /** * Object literal with config options for interactions. */ @@ -11844,7 +11844,7 @@ export namespace olx { } } - export namespace layer { + namespace layer { interface BaseOptions { opacity?: number; visible?: boolean; @@ -11961,15 +11961,15 @@ export namespace olx { } } - export namespace parser { + namespace parser { } - export namespace render { + namespace render { interface ToContextOptions { size?: ol.Size; pixelRatio?: number; } } - export namespace source { + namespace source { interface BingMapsOptions { cacheSize?: number; culture?: string; @@ -12286,7 +12286,7 @@ export namespace olx { size: ol.Size; } } - export namespace style { + namespace style { interface CircleOptions { fill?: ol.style.Fill; radius: number; @@ -12386,7 +12386,7 @@ export namespace olx { space?: number; } } - export namespace tilegrid { + namespace tilegrid { interface TileGridOptions { extent?: ol.Extent; minZoom?: number; @@ -12417,15 +12417,15 @@ export namespace olx { } } - export interface AttributionOptions { + interface AttributionOptions { html: string; } - export interface DeviceOrientationOptions { + interface DeviceOrientationOptions { tracking?: boolean; } - export interface GeolocationOptions { + interface GeolocationOptions { tracking?: boolean; trackingOptions?: PositionOptions; projection: ol.ProjectionLike; @@ -12434,12 +12434,12 @@ export namespace olx { /** * Object literal with config options for the map logo. */ - export interface LogoOptions { + interface LogoOptions { href: string; src: string; } - export interface GraticuleOptions { + interface GraticuleOptions { map?: ol.Map; maxLines?: number; strokeStyle?: ol.style.Stroke; @@ -12456,7 +12456,7 @@ export namespace olx { /** * Object literal with config options for the map. */ - export interface MapOptions { + interface MapOptions { controls?: (ol.Collection | ol.control.Control[]); pixelRatio?: number; interactions?: (ol.Collection | ol.interaction.Interaction[]); @@ -12474,7 +12474,7 @@ export namespace olx { /** * Object literal with config options for the overlay. */ - export interface OverlayOptions { + interface OverlayOptions { id?: (number | string); element?: Element; offset?: number[]; @@ -12490,7 +12490,7 @@ export namespace olx { /** * Object literal with config options for the projection. */ - export interface ProjectionOptions { + interface ProjectionOptions { code: string; units?: (ol.proj.Units | string); extent?: ol.Extent; @@ -12501,7 +12501,7 @@ export namespace olx { getPointResolution?: ((resolution: number, coords: ol.Coordinate) => number); } - export namespace view { + namespace view { interface FitOptions { size?: ol.Size; padding?: number[]; @@ -12518,7 +12518,7 @@ export namespace olx { /** * Object literal with config options for the view. */ - export interface ViewOptions { + interface ViewOptions { center?: ol.Coordinate; constrainRotation?: (boolean | number); enableRotation?: boolean; @@ -12539,18 +12539,18 @@ export namespace olx { * Object literal with options for the {@link ol.Map#forEachFeatureAtPixel} and * {@link ol.Map#hasFeatureAtPixel} methods. */ - export interface AtPixelOptions { + interface AtPixelOptions { layerFilter?: ((layer: ol.layer.Layer) => boolean); hitTolerance?: number; } - export interface FrameState { + interface FrameState { pixelRatio: number; time: number; viewState: olx.ViewState; } - export interface ViewState { + interface ViewState { center: ol.Coordinate; projection: ol.proj.Projection; resolution: number; diff --git a/types/openlayers/openlayers-tests.ts b/types/openlayers/openlayers-tests.ts index 4e83737ac3..e54c496e71 100644 --- a/types/openlayers/openlayers-tests.ts +++ b/types/openlayers/openlayers-tests.ts @@ -9,7 +9,7 @@ const fn: () => void = () => {}; const image: HTMLImageElement = new HTMLImageElement(); let jsonValue: JSON; const listener: ol.EventsListenerFunctionType = (evt) => {}; -const numberArray: number[] = []; +let numberArray: number[] = []; let numberValue: number; let object: { [key: string]: any }; let stringArray: string[]; @@ -666,7 +666,7 @@ projection = source.getProjection(); // // ol.source.TileUTFGrid // -let tileJSONValue = JSON; +const tileJSONValue = JSON; let tileUTFGrid = new ol.source.TileUTFGrid({}); tileUTFGrid = new ol.source.TileUTFGrid({ jsonp: booleanValue, diff --git a/types/openlayers/tslint.json b/types/openlayers/tslint.json index e73ae504e3..e2e8ba2c67 100644 --- a/types/openlayers/tslint.json +++ b/types/openlayers/tslint.json @@ -2,7 +2,6 @@ "extends": "dtslint/dt.json", "rules": { "no-unnecessary-class": ["allow-constructor-only"], - "no-unnecessary-qualifier": false, - "strict-export-declare-modifiers": false + "no-unnecessary-qualifier": false } }