Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(wms): Export deprecated type (v4.3) #3130

Merged
merged 1 commit into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.