Merge pull request #12416 from ahocevar/eventtype-generics
Use generics to limit event types in on(), once() and un()
This commit is contained in:
@@ -76,6 +76,7 @@ export class ImageSourceEvent extends Event {
|
||||
* Base class for sources providing a single image.
|
||||
* @abstract
|
||||
* @fires module:ol/source/Image.ImageSourceEvent
|
||||
* @extends Source<'imageloadend'|'imageloaderror'|'imageloadstart'>
|
||||
* @api
|
||||
*/
|
||||
class ImageSource extends Source {
|
||||
|
||||
@@ -40,6 +40,8 @@ import {get as getProjection} from '../proj.js';
|
||||
* Base class for {@link module:ol/layer/Layer~Layer} sources.
|
||||
*
|
||||
* A generic `change` event is triggered when the state of the source changes.
|
||||
* @template {string} EventTypes
|
||||
* @extends BaseObject<EventTypes>
|
||||
* @abstract
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -36,6 +36,8 @@ import {scale as scaleSize, toSize} from '../size.js';
|
||||
* Abstract base class; normally only used for creating subclasses and not
|
||||
* instantiated in apps.
|
||||
* Base class for sources providing images divided into a tile grid.
|
||||
* @template {string} EventTypes
|
||||
* @extends Source<EventTypes>
|
||||
* @abstract
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -33,6 +33,7 @@ import {getUid} from '../util.js';
|
||||
* Base class for sources providing tiles divided into a tile grid over http.
|
||||
*
|
||||
* @fires import("./Tile.js").TileSourceEvent
|
||||
* @extends TileSource<'tileloadend'|'tileloaderror'|'tileloadstart'>
|
||||
*/
|
||||
class UrlTile extends TileSource {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user