From d665880b0ff86b27f923ee1dddc0a679a85e3e81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toni=20Marti=CC=81?= Date: Fri, 17 Nov 2023 11:01:04 +0100 Subject: [PATCH] Add type definitions for `measurementEnd` and `measurementCancel` in `DistanceMeasurementsPlugin.d.ts` --- .../DistanceMeasurementsPlugin.d.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsPlugin.d.ts b/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsPlugin.d.ts index 3f87141985..a0782cb87f 100644 --- a/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsPlugin.d.ts +++ b/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsPlugin.d.ts @@ -125,6 +125,20 @@ export declare class DistanceMeasurementsPlugin extends Plugin { */ on(event: "measurementCreated", callback: (measurement: DistanceMeasurement)=> void): void; + /** + * Fires when a measurement is completed. + * @param {String} event The measurementEnd event + * @param {Function} callback Callback fired on the event + */ + on(event: "measurementEnd", callback: (measurement: DistanceMeasurement)=> void): void; + + /** + * Fires when a measurement is cancelled. + * @param {String} event The measurementCancel event + * @param {Function} callback Callback fired on the event + */ + on(event: "measurementCancel", callback: (measurement: DistanceMeasurement)=> void): void; + /** * Fires when a measurement is destroyed. * @param {String} event The measurementDestroyed event