Skip to content

Conversation

k-nut
Copy link
Contributor

@k-nut k-nut commented Aug 6, 2025

In #20016, the canvasContext property of RenderParameters was deprecated in favor of the new canvas property.

The JSDoc was updated to include the new parameter along with the old one.

I think the old one should be enclosed in [] to mark it as optional (and to allow usage from TypeScript with just the canvas parameter provided).

I also reordered the properties so that all required properties come first, follow by optional ones.

In mozilla#20016, the `canvasContext` property of `RenderParameters` was deprecated in favor of the new `canvas` property.

The JSDoc was updated to include the new parameter along with the old one.

I think the old one should be enclosed in `[]` to mark it as optional (and to allow usage from TypeScript with just the `canvas` parameter provided).

I also reordered the properties so that all required properties come first, follow by optional ones.
@nicolo-ribaudo
Copy link
Contributor

Does JSDoc support marking things as depretacted?

@k-nut
Copy link
Contributor Author

k-nut commented Aug 6, 2025

Does JSDoc support marking things as depretacted?

Not for individual @propertys unfortunately as far as I could tell.

@calixteman calixteman merged commit 41ca92b into mozilla:master Aug 7, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants