Closed ST-DDT closed 2 years ago
For now, get with the last one. Sidenote: "Overloading" is only a concept of TypeScript but not JavaScript.
This PR is here to prevent me accidentally breaking the docs generation, not fixing issues that it currently has.
But this is not a PR?
This PR is here to prevent me accidentally breaking the docs generation, not fixing issues that it currently has.
But this is not a PR?
Yeah, I forgot to remove that line when opening this issue.
Isn't this kinda obsolete/low priority since this will be deprecated in v6.2 by #503?
Well, the methods with format
s might benefit from multiple signatures e.g. by limiting the return type to the exact match.
Not sure how many method we have with these though.
https://github.com/faker-js/faker/blob/a205c0770c8661ccddf1b9166cbb110e86fc2485/src/time.ts#L24-L26
It looks like it isn't that simple. Typedoc does not detect all/the last signature and it does only add the comments to the first one. I will try to debug that.
It looks like it isn't that simple. Typedoc does not detect all/the last signature and it does only add the comments to the first one. I will try to debug that.
So we need to open a PR at TypeDoc?
Currently, we only show the first signature of a method. This results in incomplete information being see below for an example.
I considered these options:
This involves the following questions:
This issue is here to discuss this.
Here is the only method that does use multiple signatures at this point in time: https://github.com/faker-js/faker/blob/60d3cc519cd2cab061a23fbe09164d8b59e177ff/src/random.ts#L174-L185 And it does kind of show up wrong: https://fakerjs.dev/api/random.html#objectElement
_Originally posted by @ST-DDT in https://github.com/faker-js/faker/pull/574#discussion_r818199495_