CesiumGS / CesiumGS/cesium

TypeScript: createDefaultImageryProviderViewModels() and similar methods are missing

Open
#9,084 3 comments 0 reactions 0 assignees View on GitHub
category - packaging & tooling category - typescript type - bug
Dominant language
JavaScript
Stars
15.7k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

First of all, thank you for adding TypeScript support. It's really nice to have the API documentation available in the IDEs. When adapting my code to the [webpack-cesium-example](https://github.com/CesiumGS/cesium-webpack-example), I noticed that `import { createDefaultImageryProviderViewModels } from "cesium";` works, but the method is not included in the definitions file, thus the IDEs (e.g. WebStorm in the screenshot below) give a warning. I use `createDefaultImageryProviderViewModels()` to initially change the base map, as mentioned on [stackoverflow](https://stackoverflow.com/questions/37502099/base-map-selector-does-not-work).

In the bundled Cesium.js file, I saw that several methods (e.g. createMaterialPropertyDescriptor, createUniform) are missing in the TypeScript file, whereas others (e.g. createCommand, createGuid) are present. As I'm new to TypeScript, I cannot tell the reason or even a solution, but it would be helpful, when all exported methods would be included and eventually documented.

![webstorm_warning](https://user-images.githubusercontent.com/9949879/89293617-7bc50200-d65e-11ea-8d99-8caa4646f9c6.PNG)

Contributor guide

Open the contributing guide

Research direction

Start by comparing the TypeScript definitions file with the bundled Cesium.js exports, focusing on createDefaultImageryProviderViewModels(), createMaterialPropertyDescriptor, and createUniform. Check how existing exports such as createCommand and createGuid are represented, then verify that the missing methods no longer produce IDE warnings.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
api, developer-experience
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.