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

Typing for ImageryLayer contructor is incorrect #11625

Closed
angrycat9000 opened this issue Nov 13, 2023 · 0 comments · Fixed by #11669
Closed

Typing for ImageryLayer contructor is incorrect #11625

angrycat9000 opened this issue Nov 13, 2023 · 0 comments · Fixed by #11669

Comments

@angrycat9000
Copy link
Contributor

JSDoc indicates both the provider and options arguments are required.

* @param {ImageryProvider} imageryProvider The imagery provider to use.
* @param {ImageryLayer.ConstructorOptions} options An object describing initialization options

However they are both defaulted to the empty object in the constructor. Though imageryProvider has already been assigned to this._imageryProvider at this points so not sure if that is a bug or this should truly be an required argument.

options = defaultValue(options, defaultValue.EMPTY_OBJECT);
imageryProvider = defaultValue(imageryProvider, defaultValue.EMPTY_OBJECT);

This causes errors with Typescript when the options argument is not provided

image

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

Successfully merging a pull request may close this issue.

1 participant