Skip to content

Commit

Permalink
fix(wms): Export deprecated type (#3130)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibgreen authored Oct 14, 2024
1 parent 992d24e commit 15a11e0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ package-lock.json
!.yarn/versions

tsconfig.tsbuildinfo
tsconfig.build.tsbuildinfo

.nyc_output/
coverage/
Expand Down
1 change: 1 addition & 0 deletions modules/wms/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,5 @@ export {ArcGISImageServerSource as _ArcGISImageServerSource} from './services/ar
// DEPRECATED: TODO - remove once deck.gl has been udpated
export {ImageSource} from '@loaders.gl/loader-utils';
export type {ImageType} from '@loaders.gl/images';
export type {ImageSourceType} from './lib/deprecated/create-image-source';
export {createImageSource} from './lib/deprecated/create-image-source';
5 changes: 3 additions & 2 deletions modules/wms/src/lib/deprecated/create-image-source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import type {WMSImageSourceProps} from '../../services/ogc/wms-service';
import {WMSSource} from '../../services/ogc/wms-service';
import {ArcGISImageServerSource} from '../../services/arcgis/arcgis-image-server';

/** @deprecated */
export type ImageSourceType = 'wms' | 'arcgis-image-server' | 'template';

const SOURCES: Source[] = [WMSSource, ArcGISImageServerSource];
Expand All @@ -30,7 +31,7 @@ type CreateImageSourceProps = ImageSourceProps &
*/
export function createImageSource(
url: string,
props: CreateImageSourceProps,
props: CreateImageSourceProps = {},
sources = SOURCES
): ImageSource {
const {type = 'auto'} = props;
Expand All @@ -40,7 +41,7 @@ export function createImageSource(
if (!source) {
throw new Error('Not a valid image source type');
}
return source.createDataSource(url, props) as ImageSource;
return source.createDataSource(url, props) as unknown as ImageSource;
}

/** Guess service type from URL */
Expand Down
1 change: 0 additions & 1 deletion tsconfig.build.tsbuildinfo

This file was deleted.

0 comments on commit 15a11e0

Please sign in to comment.