From e0d7a0b4d5049722c97f4972a31c00693e0c52ce Mon Sep 17 00:00:00 2001 From: Edward Nash Date: Tue, 5 Nov 2024 15:39:07 +0100 Subject: [PATCH] feature: Expose OLCesiumOptions Downstream projects find it helpful to be able to reuse the type definition of the constructor options for the main OLCesium object. --- src/olcs.ts | 2 ++ src/olcs/OLCesium.ts | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/olcs.ts b/src/olcs.ts index f8496e91e..578d9cfa1 100644 --- a/src/olcs.ts +++ b/src/olcs.ts @@ -1,6 +1,8 @@ import OLCesium from './olcs/OLCesium.js'; export default OLCesium; +export type {OLCesiumOptions} from './olcs/OLCesium.js'; + export {default as AbstractSynchronizer} from './olcs/AbstractSynchronizer.js'; export {default as RasterSynchronizer} from './olcs/RasterSynchronizer.js'; export {default as VectorSynchronizer} from './olcs/VectorSynchronizer.js'; diff --git a/src/olcs/OLCesium.ts b/src/olcs/OLCesium.ts index 22642c2f2..332e7ce5d 100644 --- a/src/olcs/OLCesium.ts +++ b/src/olcs/OLCesium.ts @@ -61,13 +61,13 @@ type SceneOptions = { msaaSamples?: number; } -type OLCesiumOptions = { +export type OLCesiumOptions = { map: Map, time?: () => JulianDate, target?: Element | string, createSynchronizers?: (map: Map, scene: Scene, dataSourceCollection: DataSourceCollection) => AbstractSynchronizer[], stopOpenLayersEventsPropagation?: boolean, - sceneOptions?: SceneOptions + sceneOptions?: Exclude } // FIXME: remove this when all the synchronizers are migrated to typescript.