Andreas Hocevar
bb544114ee
Merge pull request #8765 from ahocevar/fixed-tileurlfunction-bye-bye
...
Simplify logic for fixed tile url functions
2018-10-03 10:10:18 +02:00
ahocevar
4aff3d0631
Simplify logic for fixed tile url functions
2018-10-02 17:26:22 +02:00
Frederic Junod
ae87cad7ef
Use FeatureLike typedef
...
Use `import("./Feature.js").FeatureLike` typedef instead of `import("./Feature.js").default|import("./render/Feature.js").default`
2018-10-02 12:58:56 +02:00
Kevin Schmidt
7dbe38358a
Replace TileClass with typeof ImageTile
2018-10-01 08:37:01 -06:00
Kevin Schmidt
accdc79c05
Use typeof to simplify JSDoc class types
2018-10-01 08:30:06 -06:00
Frédéric Junod
a2c7eb80fd
Merge pull request #8736 from fredj/misc
...
Typescript misc fixes
2018-10-01 08:29:02 +02:00
Andreas Hocevar
b49f2448c7
Merge pull request #8744 from wallw-bits/fix-typecheck-vectortilesource
...
Fix type checks in VectorTileSource
2018-09-29 20:44:56 +02:00
William Wall
a685e85c10
Fix type checks in VectorTileSource
...
Use typeof(Class) instead of defining a typedef for the tile class
2018-09-28 12:33:33 -06:00
Andreas Hocevar
9cbe9926b4
Merge pull request #8742 from wallw-bits/fix-typecheck-vectorsource-2
...
Fix type checks in Vector source
2018-09-28 18:20:46 +02:00
William Wall
0bbbd33bb1
Fix type check in Raster source
2018-09-28 09:38:33 -06:00
William Wall
4da372d515
Fix type checks in Vector source
...
The getResolutions override is unnecessary because the parent
implementation also returns undefined.
2018-09-28 09:24:55 -06:00
Frederic Junod
3d9b1af105
Remove 'extent' properties from ol/source/Tile children classes
2018-09-28 09:13:43 +02:00
William Wall
1ee0c50c8a
Fix type check in ol/source/Tile
...
Remove 'extent' because the parent Source class does not contain
'extent' on its options or use options.extent in the constructor.
Also removed 'extent' from 'Options' for 'TileSource'.
2018-09-27 10:47:51 -06:00
Frederic Junod
60c5d016a6
Remove unused 'opaque' property from ol/source/Stamen options
...
And set the `layer` property as mandatory.
2018-09-27 10:00:02 +02:00
Frederic Junod
7eee6ba07a
Remove '=' from type when the parameter is not optional
2018-09-27 10:00:02 +02:00
Frederic Junod
d8ee6acefa
Remove extra imports in jsdoc
2018-09-27 10:00:02 +02:00
Frederic Junod
9cf7c71df8
Fix type checks in TileArcGISRest
2018-09-26 15:51:55 +02:00
Frédéric Junod
55b300082a
Merge pull request #8708 from wallw-bits/fix-typecheck-imagecanvas
...
Fix type checks in ImageCanvas source
2018-09-26 15:50:42 +02:00
William Wall
d37e04e8f3
Fix type checks in ImageArcGISRest
...
Added proper @link tags to links in descriptions. Fixed unclosed
backtick. Made params optional like the description says.
2018-09-25 14:00:23 -06:00
William Wall
3ba789eae6
Fix type checks in ImageCanvas source
...
Fixed constructor docs specifying optional options without a
default value. Fixed malformed @link tag in typedef description.
canvasFunction type was previously declared with the 'this' type
as ImageCanvas, but the 'this' ref was not passed on the scope when
calling the function.
2018-09-25 13:01:02 -06:00
Frederic Junod
7d1b90c7d2
Remove unused extent property from ol/source/Image options
2018-09-24 10:14:33 +02:00
Frederic Junod
557e2c9029
Remove extra imports in jsdoc
...
The symbols are already imported (es6 import)
2018-09-24 10:11:03 +02:00
Frederic Junod
3b208864bc
Remove unused properties from Cluster options
...
Follow up on #8692
2018-09-24 10:06:25 +02:00
Frédéric Junod
7d36b893d3
Merge pull request #8686 from fredj/import
...
Remove extra imports in jsdoc
2018-09-24 10:02:27 +02:00
Tim Schaub
7c5ff5422d
Merge pull request #8692 from wallw-bits/fix-typecheck-cluster
...
Type check fixes for Cluster source
2018-09-21 23:11:58 -06:00
Tim Schaub
c9068526e7
Merge pull request #8677 from wallw-bits/fix-typecheck-vectorsource
...
Type check fixes for VectorSource
2018-09-21 16:58:24 -06:00
Tim Schaub
9fd4807920
Merge pull request #8684 from wallw-bits/fix-typecheck-bingmaps
...
Define BingMapsImageryMetadataResponse type
2018-09-21 16:57:13 -06:00
Tim Schaub
16bd9a5450
Merge pull request #8690 from wallw-bits/fix-typecheck-cartodb
...
Fix type checks in CartoDB
2018-09-21 16:53:54 -06:00
William Wall
1c10bbf94c
Fix arithmetic error on potential array
...
And also add zoomMax to response type
2018-09-21 11:57:25 -06:00
William Wall
1da2db83da
Fix type check errors for Image source
...
The parent class does not accept an extent on its options. Also
check that the image is an img or video tag before setting the
source as Canvas does not have the src property.
2018-09-21 08:35:41 -06:00
William Wall
10c8371b38
Type check fixes for Cluster source
...
Removed options unused by super class.
2018-09-21 08:21:20 -06:00
William Wall
82cfa54584
Fix type checks in CartoDB
...
Removed state from super call options because super doesn't use it.
Defined CartoDBLayerInfo response type.
2018-09-21 08:00:45 -06:00
Frederic Junod
821a08ea79
Remove extra imports in jsdoc
...
The symbols are already imported (es6 import)
2018-09-21 09:12:06 +02:00
Frédéric Junod
725687c987
Merge pull request #8672 from fredj/raster_source_types
...
Fix source type in Raster source
2018-09-21 08:22:59 +02:00
William Wall
fd0d6ff6f6
Define BingMapsImageryMetadataResponse type
2018-09-20 16:25:48 -06:00
Tim Schaub
c414bd5923
Merge pull request #8678 from wallw-bits/fix-typecheck-source-tileimage
...
Ensure image is Image or Video before settings src
2018-09-20 09:40:29 -06:00
Tim Schaub
57bd015972
Merge pull request #8676 from wallw-bits/fix-typecheck-wmts
...
Cast tileGrid to WMTSTileGrid for type check
2018-09-20 04:24:08 -06:00
William Wall
adfc174af3
Ensure image is Image or Video before settings src
...
Canvas elements do not contain the 'src' property.
2018-09-19 12:12:50 -06:00
William Wall
20125ae96c
Type check fixes for VectorSource
...
Added parameter types to event listeners. Fixed return type for
feature collection branch. Removed duplicate template definition.
2018-09-19 11:04:35 -06:00
William Wall
0994362bfe
Cast tileGrid to WMTSTileGrid for type check
2018-09-19 10:31:28 -06:00
William Wall
45f2324a4e
Get width as number from number|Size
...
This satisfies tsc in addition to being a bit more defensive from
custom tile grids, even if using them is very uncommon for this
source.
2018-09-19 10:02:33 -06:00
Frederic Junod
3029a07c1a
Fix source type in Raster source
...
The `sources` is an array of layer or source
2018-09-19 15:34:34 +02:00
Frédéric Junod
5f63575106
Merge pull request #8658 from fredj/proto_void
...
Don't define functions in the prototype
2018-09-19 14:53:59 +02:00
Frederic Junod
600d156d01
Add missing 'module' annotation
2018-09-19 11:51:34 +02:00
Frederic Junod
7cb85fa975
Don't define functions in the prototype
...
If `VOID` is used, TypeScript is not able to figure out what the function parameters are.
Before:
```
$ npx tsc | wc -l
1188
```
After:
```
$ npx tsc | wc -l
1169
```
2018-09-19 08:40:14 +02:00
ahocevar
f29e6ac397
Fix more incorrect type imports
2018-09-13 11:42:59 +02:00
Tim Schaub
e49c691a22
Add types for the UTFGrid and TileJSON JSON responses
2018-09-06 10:11:35 -06:00
Frederic Junod
ea616e7751
Don't import ourselves
2018-09-06 09:05:32 +02:00
Tim Schaub
ccfacc5ee6
Transformed types
...
Using the [ts.js codemod](https://gist.github.com/tschaub/1ea498c9d1e5268cf36d212b3949be4e ):
jscodeshift --transform ts.js src
2018-09-05 08:05:29 -06:00
Frederic Junod
5b8b470568
Fix imports in jsdoc blocks
2018-09-03 09:41:00 +02:00