Skip to content

Diverse typescript types errors #8924

@Crocsx

Description

@Crocsx

Hello,

Thanks for bringing in built in types in cesium, it's a really nice addition

I have the following thing that I believe is missing (and other but the issues are already posted).

  1. Can't import when from Cesium

like in this code :

var promise = Cesium.sampleTerrain(terrainProvider, 11, positions);
Cesium.when(promise, function(updatedPositions) {
     // positions[0].height and positions[1].height have been updated.
    // updatedPositions is just a reference to positions.
});

can't find when from cesium

  1. Polygon can't be used at geometry

I can't do this anymore, which I believe should work from the docs (https://cesium.com/docs/cesiumjs-ref-doc/GeometryInstance.html)

      const rectangleInstance = new GeometryInstance({
        geometry: new PolygonGeometry({
          polygonHierarchy: new PolygonHierarchy(AreaUtils.getAreaCoordinates(area)),
        }),
      });

Type 'PolygonGeometry' is missing the following properties from type 'Geometry': attributes, indices, primitiveType, boundingSphere

  1. Can't add IonImageryProvider to Imagerylayer

const newLayer = new ImageryLayer(new IonImageryProvider({ assetId: provider.id }));

Argument of type 'IonImageryProvider' is not assignable to parameter of type 'ImageryProvider'.
Type 'IonImageryProvider' is missing the following properties from type 'ImageryProvider': defaultNightAlpha, defaultDayAlphats(2345)

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