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: Inconsistency method return type this #22333

Closed
servinlp opened this issue Aug 15, 2021 · 1 comment · Fixed by #22799
Closed

Docs: Inconsistency method return type this #22333

servinlp opened this issue Aug 15, 2021 · 1 comment · Fixed by #22799

Comments

@servinlp
Copy link
Contributor

servinlp commented Aug 15, 2021

Describe the problem

As discussed in #22237 we want to documentation to be consistent with the return type when nothing is returned in a method. While working on fixing this inconsistency I came across another.

In, for example, BufferAttribute the applyMatrix3, applyMatrix4 and applyNormalMatrix methods all return this. On the other hand the copy method also returns this (code) but has a return type of BufferAttribute while then clone method also has the return type of BufferAttribute while actually constructing a new BufferAttribute (code).

My question, while i'm changing the return types to undefined when nothing is returned do we also want to fix this? (We meaning I'll do it together with the undefined return types.)
And if we want to do this, how should it be.

What I would like to propose is the usage of this when this is actually returned and only the current type (in this case BufferAttribute) when a new class is being constructed.

Love to hear everybody's opinions.

@Mugen87
Copy link
Collaborator

Mugen87 commented Aug 15, 2021

Thanks for bringing this topic up! It would be indeed good to clean up the return types.

What I would like to propose is the usage of this when this is actually returned and only the current type (in this case BufferAttribute) when a new class is being constructed.

This is also my preference 👍 .

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.

2 participants