Skip to content

Commit

Permalink
feature: Expose OLCesiumOptions
Browse files Browse the repository at this point in the history
Downstream projects find it helpful to be able to reuse the type
definition of the constructor options for the main OLCesium object.
  • Loading branch information
ejn committed Nov 5, 2024
1 parent 7b31dc3 commit c88ea4a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/olcs.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
4 changes: 2 additions & 2 deletions src/olcs/OLCesium.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<ImageryLayer | VectorLayerCounterpart>[],
stopOpenLayersEventsPropagation?: boolean,
sceneOptions?: SceneOptions
sceneOptions?: Omit<SceneOptions, 'canvas'|'scene3DOnly'>
}

// FIXME: remove this when all the synchronizers are migrated to typescript.
Expand Down

0 comments on commit c88ea4a

Please sign in to comment.