refactor: include item kind into url

This commit is contained in:
iCrawl
2022-08-23 05:13:53 +02:00
parent 206523587a
commit 11e02f1e5d
3 changed files with 39 additions and 37 deletions

View File

@@ -40,17 +40,17 @@ export function generatePath(items: readonly ApiItem[], version: string) {
const functionItem = item as ApiFunction;
path += `/${functionItem.displayName}${
functionItem.overloadIndex && functionItem.overloadIndex > 1 ? `:${functionItem.overloadIndex}` : ''
}`;
}:${item.kind}`;
break;
case ApiItemKind.Property:
case ApiItemKind.Method:
case ApiItemKind.MethodSignature:
case ApiItemKind.PropertySignature:
// TODO: Take overloads into account
path += `#${item.displayName}`;
path += `#${item.displayName}:${item.kind}`;
break;
default:
path += `/${item.displayName}`;
path += `/${item.displayName}:${item.kind}`;
}
}