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

Knockout not exported from Cesium.d.ts #12423

Open
ijessen-mitll opened this issue Jan 9, 2025 · 0 comments
Open

Knockout not exported from Cesium.d.ts #12423

ijessen-mitll opened this issue Jan 9, 2025 · 0 comments

Comments

@ijessen-mitll
Copy link

ijessen-mitll commented Jan 9, 2025

What happened?

knockout is exported from Cesium.js, but there is no matching export within Cesium.d.ts. Therefore there is no obvious type-safe way to access knockout functionality, such as subscribing to observables within view models.

The work around is to disable typescript checking of the relevant line:

// @ts-ignore 
import { knockout as ko } from 'cesium';

TS type definitions exist for both knockout-es5 and knockout:

https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/knockout.es5/index.d.ts
https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/knockout/index.d.ts

Environment

CesiumJS Version: 1.123.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant