-
Notifications
You must be signed in to change notification settings - Fork 604
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
[api-documenter] Overloaded namespace-level functions named with '_' in YAML #1052
Comments
This is a bug. We should fix it. I haven't done in-depth testing for overloaded functions yet... thanks for reminding me. :-) |
@AlexJerabek I finally got around to looking at this. The /**
* Calculate the DocFX "uid" for the ApiItem
* Example: node-core-library.JsonFile.load
*/
private _getUid(apiItem: ApiItem): string {
let result: string = '';
for (const hierarchyItem of apiItem.getHierarchy()) {
// For overloaded methods, add a suffix such as "MyClass.myMethod_2".
let qualifiedName: string = hierarchyItem.displayName;
if (ApiParameterListMixin.isBaseClassOf(hierarchyItem)) {
if (hierarchyItem.overloadIndex > 0) {
qualifiedName += `_${hierarchyItem.overloadIndex}`;
}
} I think the reason you're seeing it on the web page is because the same value gets added as the - uid: onenote.OneNote.run_1
summary: >-
Executes a batch script that performs actions on the OneNote object model, using the request context of a
previously-created API object.
name: OneNote.run_1
fullName: OneNote.run_1 Originally we were specifying Maybe you could chat with @dend and determine exactly what should go in the Basically we just need to decide what the YAML file is supposed to look like, and then the fix should be quick and easy. @natalieethell FYI |
This issue belongs to a family of closely related issues. I've created metaissue #1308 to come up with a unified fix that tackles them all together. |
PR #1450 fixes this (hopefully). |
In testing out v7 of API Extractor/Documenter, I found that overloaded namespace-level functions include an underscore in both their uid and name (as shown in the yaml sample below. Other overloaded functions do not have the underscore in their name.
Sample d.ts:
The text was updated successfully, but these errors were encountered: