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

Docs: Fix return value type of BufferAttribute.onUpload #20890

Merged
merged 2 commits into from Dec 17, 2020
Merged

Docs: Fix return value type of BufferAttribute.onUpload #20890

merged 2 commits into from Dec 17, 2020

Conversation

luisfonsivevo
Copy link
Contributor

The method BufferAttribute.onUpload returns this (the BufferAttribute itself), not null. There are also many other BufferAttribute methods that return this, but they are all marked as returning BufferAttribute. I'm not sure if this was intentional, but the onUpload method return value type is definitely incorrect in the docs. I can update the PR (and Chinese docs) once clarified.

@Mugen87
Copy link
Collaborator

Mugen87 commented Dec 15, 2020

There are also many other BufferAttribute methods that return this, but they are all marked as returning BufferAttribute.

I would say this is incorrect. E.g. clone() has a return type of BufferAttribute since it creates a new instance. Whenever a method returns this, it should be this in the docs and TS declaration files, too.

@Mugen87 Mugen87 added this to the r124 milestone Dec 17, 2020
@mrdoob mrdoob changed the title Fix return value type of BufferAttribute.onUpload Docs: Fix return value type of BufferAttribute.onUpload Dec 17, 2020
@mrdoob mrdoob merged commit fe879a6 into mrdoob:dev Dec 17, 2020
@mrdoob
Copy link
Owner

mrdoob commented Dec 17, 2020

Thanks!

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.

None yet

3 participants