[@types/ol] Add GeolocationError (#43742)

* Updated BaseEvent from ./ol/events

Fix issue: https://github.com/openlayers/openlayers/issues/10905

* create class GeolocationError to extent BaseEvent

Co-authored-by: user <pro.cyril.antolini@protonmail.com>
This commit is contained in:
daboudii 2020-04-14 02:54:44 +03:00 committed by GitHub
parent bf2417889d
commit b47880401f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,10 +62,16 @@ export default class Geolocation extends BaseObject {
on(type: 'change:trackingOptions', listener: (evt: ObjectEvent) => void): EventsKey;
once(type: 'change:trackingOptions', listener: (evt: ObjectEvent) => void): EventsKey;
un(type: 'change:trackingOptions', listener: (evt: ObjectEvent) => void): void;
on(type: 'error', listener: (evt: BaseEvent) => void): EventsKey;
once(type: 'error', listener: (evt: BaseEvent) => void): EventsKey;
un(type: 'error', listener: (evt: BaseEvent) => void): void;
on(type: 'error', listener: (evt: GeolocationError) => void): EventsKey;
once(type: 'error', listener: (evt: GeolocationError) => void): EventsKey;
un(type: 'error', listener: (evt: GeolocationError) => void): void;
on(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
once(type: 'propertychange', listener: (evt: ObjectEvent) => void): EventsKey;
un(type: 'propertychange', listener: (evt: ObjectEvent) => void): void;
}
export class GeolocationError extends BaseEvent {
constructor(type: string);
code: number;
message: string;
}