How to use special ImageryProvider in TypeScript environment?

Hi, I’m currently testing the new TypeScript support and run into some problems. Before, the following code would compile and run properly:

    const urlTemplateImageryProvider = new UrlTemplateImageryProvider({


But now the compiler throws an error, because addImageryProvider expects an ImageryProvider, and the special versions like UriTemplateImageryProvider, or the WMS / WMTS provider are no ImageryProvider.

How can I solve this?

Thanks for reporting this! Looks like this is a bug, as pointed out here:

Oh, thanks. Haven’t seen that bug. So I hope, it’s gonna be fixed soon.

@Matt_Amato just opened a fix for this here: So it’ll be in the next CesiumJS release or a patch release coming out sooner than that.