Skip to content

Knockout not exported from Cesium.d.ts #12423

Open
@ijessen-mitll

Description

@ijessen-mitll

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions