From 27a4ffdc6f5139e3c03e507ae7c7086ba3d82cb0 Mon Sep 17 00:00:00 2001 From: YairTawil Date: Tue, 23 Jan 2018 20:10:26 +0200 Subject: [PATCH] types/openlayers - updates for olx.interaction.SelectOptions and ol.View (#23123) * Initialize ol type * Type definitions * import openlayers * Update tsconfig.json * Update index.d.ts * fix(): no-declare-current-package * lint(): new line at end of files * fix(test, lint) * fix(tsconfig): format tsconfig.json * fix(types/ol): add import 'ol' from 'openalyers' * types/openlayers add hitTolerance to SelectOptions * update 'Definitions by' --- types/openlayers/index.d.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/types/openlayers/index.d.ts b/types/openlayers/index.d.ts index c2e7ab1530..924b66f514 100644 --- a/types/openlayers/index.d.ts +++ b/types/openlayers/index.d.ts @@ -6,6 +6,7 @@ // Alexandre Melard // Chad Johnston // Dan Manastireanu +// Yair Tawil // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // Definitions partially generated using tsd-jsdoc (https://github.com/englercj/tsd-jsdoc) @@ -12383,11 +12384,11 @@ declare module ol { * The size is the pixel dimensions of the box into which the calculated extent * should fit. In most cases you want to get the extent of the entire map, * that is `map.getSize()`. - * @param {ol.Size} size Box pixel size. + * @param {ol.Size=} size Box pixel size. * @return {ol.Extent} Extent. * @api stable */ - calculateExtent(size: ol.Size): ol.Extent; + calculateExtent(size?: ol.Size): ol.Extent; /** * Get the maximum resolution of the view. @@ -13325,7 +13326,8 @@ declare module olx { * multi: (boolean|undefined), * features: (ol.Collection.|undefined), * filter: (ol.SelectFilterFunction|undefined), - * wrapX: (boolean|undefined)}} + * wrapX: (boolean|undefined), + * hitTolerance: (number|undefined)}} */ interface SelectOptions { addCondition?: ol.EventsConditionType; @@ -13338,6 +13340,7 @@ declare module olx { features?: ol.Collection; filter?: ol.SelectFilterFunction; wrapX?: boolean; + hitTolerance?: number; }