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

JSDoc: Add @deprecated #30284

Merged
merged 2 commits into from
Jan 9, 2025
Merged

JSDoc: Add @deprecated #30284

merged 2 commits into from
Jan 9, 2025

Conversation

s-rigaud
Copy link
Contributor

@s-rigaud s-rigaud commented Jan 8, 2025

Description

I tried to add @deprecated for various methods. I'm not sure if the old inline comment should be keep or not for readability.

Adding the @deprecated tag has two benefits:

  • It adds a warning in the doc
    image

  • Depending on your IDE, it also makes more clear what is deprecated. If the method comments are properly exported in TS, this will allow to see the warning and the expected replacement before running any code.
    image

Copy link

github-actions bot commented Jan 8, 2025

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 339.51
79.09
339.51
79.09
+0 B
+0 B
WebGPU 490.96
136.34
490.96
136.34
+0 B
+0 B
WebGPU Nodes 490.43
136.23
490.43
136.23
+0 B
+0 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Before After Diff
WebGL 465.35
112.14
465.35
112.14
+0 B
+0 B
WebGPU 560.26
151.75
560.26
151.75
+0 B
+0 B
WebGPU Nodes 516.35
141.53
516.35
141.53
+0 B
+0 B

@Mugen87
Copy link
Collaborator

Mugen87 commented Jan 8, 2025

I think it makes sense to add these docs. When we deprecate things in the future, methods and properties are already documented so it's simply adding the @deprecated to provide good feedback.

@Mugen87 Mugen87 merged commit ee4bdac into mrdoob:dev Jan 9, 2025
10 of 11 checks passed
@Mugen87 Mugen87 added this to the r173 milestone Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants