Andreas Hocevar
98e63c4bf1
Allow any return type from listener functions
2021-07-12 23:18:21 +02:00
Andreas Hocevar
e9e664f3c9
Add typed signature for Observable#un()
2021-07-10 11:28:50 +02:00
Simon Seyock
3a73af842d
Remove comments after jsdoc.
2021-07-10 11:28:49 +02:00
Simon Seyock
87830c6959
Fix Observable signatures.
2021-07-10 11:28:49 +02:00
Simon Seyock
d914006d51
Add signatures for once.
2021-07-10 11:28:49 +02:00
Simon Seyock
1870a64984
Add CombinedOnSignature.
2021-07-10 11:28:49 +02:00
Simon Seyock
25a095e489
Observable workaround for on.
2021-07-10 11:28:49 +02:00
Simon Seyock
baf9ee6a93
Add on signatures for BaseObject and Observable.
2021-07-10 11:28:47 +02:00
Simon Seyock
7701ab932b
Add auxiliary type for the on signatures.
2021-07-10 11:28:47 +02:00
Simon Seyock
c8f43050c4
Revert "Merge pull request #12416 from ahocevar/eventtype-generics"
...
This reverts commit b6c143deb2 , reversing
changes made to 7777821df5 .
2021-07-10 11:28:46 +02:00
Andreas Hocevar
018ad97f25
Use generics to limit event types in on(), once() and un()
2021-06-20 22:25:47 +02:00
Andreas Hocevar
852fe2a3fe
Allow using un() for events registered with once()
2020-06-11 12:14:32 +02:00
Andreas Hocevar
9b1f8fa1d1
Losen listener type
2020-04-17 11:28:33 +02:00
Tim Schaub
054af09032
Make code prettier
...
This updates ESLint and our shared eslint-config-openlayers to use Prettier. Most formatting changes were automatically applied with this:
npm run lint -- --fix
A few manual changes were required:
* In `examples/offscreen-canvas.js`, the `//eslint-disable-line` comment needed to be moved to the appropriate line to disable the error about the `'worker-loader!./offscreen-canvas.worker.js'` import.
* In `examples/webpack/exapmle-builder.js`, spaces could not be added after a couple `function`s for some reason. While editing this, I reworked `ExampleBuilder` to be a class.
* In `src/ol/format/WMSGetFeatureInfo.js`, the `// @ts-ignore` comment needed to be moved down one line so it applied to the `parsersNS` argument.
2020-04-06 12:54:09 -06:00
Andreas Hocevar
4fa454f2b3
Fix types
2020-03-10 14:20:12 +01:00
Simon Seyock
2e1dee1994
fixed jsdoc type annotations
2019-09-29 19:35:11 +02:00
ahocevar
ebfb20440a
Simplify events and store listeners only in one place
2019-09-04 16:48:43 +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
Tim Schaub
40486a0ecc
Avoid shadowing EventTarget
2018-07-26 10:14:58 -06:00
Tim Schaub
d12ef20b12
Use Array<Foo> instead of Array.<Foo>
2018-07-25 18:32:43 -07:00
ahocevar
2fd022d215
Use extends and super for Observable
2018-07-17 14:15:32 +02:00
Frederic Junod
f2d0b11d24
Move jsdoc constructor comments
2018-07-17 09:59:00 +02:00
Tim Schaub
7b4a73f3b9
Automated class transform
...
npx lebab --replace src --transform class
2018-07-16 16:18:16 -06:00
ahocevar
28409486a5
Make classes in ol/ available as named exports from ol
2018-06-21 18:08:17 +02:00
ahocevar
440d1ad3e1
Shorter module paths for default exports
2018-04-25 17:25:39 +02:00
Andreas Hocevar
95d6251dbb
Get rid of olx.js and typedef.js typedefs for ol
2018-03-08 18:57:24 +01:00
Frederic Junod
73b15ef8d7
Better code indentation
2018-02-28 16:46:45 +01:00
Frederic Junod
2fd75566fb
Named exports from ol/Observable
2018-02-21 09:01:08 +01:00
Tim Schaub
7e7631c42a
Named exports from ol/events
2018-01-24 10:09:57 -07:00
Tim Schaub
ad62739a6e
Use blocked scoped variables
...
In addition to using const and let, this also upgrades our linter config and removes lint (mostly whitespace).
2018-01-12 00:50:30 -07:00
Tim Schaub
35db8721b2
Rename _ol_Observable_ to Observable
2018-01-10 09:35:43 -07:00
simonseyock
d7c48314b8
observable
2017-12-19 13:15:11 +01:00
Marc Jansen
c620688758
Rename _ol_events_EventTarget_ to EventTarget
2017-12-15 16:19:03 +01:00
Marc Jansen
479c7a4668
Rename _ol_events_EventType_ to EventType
2017-12-15 16:19:03 +01:00
Tim Schaub
87295a74dd
Use named exports from ol/index.js
2017-12-12 12:34:23 -07:00
Tim Schaub
7f47883c48
Transformed
2017-12-12 06:53:18 -07:00
Tim Schaub
1cdb6a66f0
Imports cased like the filename
2017-12-12 06:53:17 -07:00