mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
fix(site): resolve aliased part descriptions in api docs (#518)
This commit is contained in:
@@ -2,8 +2,10 @@ import * as ts from 'typescript';
|
||||
import * as tae from 'typescript-api-extractor';
|
||||
|
||||
export interface PartExport {
|
||||
/** PascalCase export name (e.g., "Value", "Group", "Separator"). */
|
||||
/** PascalCase exported part name (e.g., "Value", "Group", "Separator"). */
|
||||
name: string;
|
||||
/** Local symbol name in the source module before aliasing. */
|
||||
localName: string;
|
||||
/** Source path (e.g., "./time-value", "./time-group"). */
|
||||
source: string;
|
||||
}
|
||||
@@ -39,8 +41,10 @@ export function extractParts(filePath: string, program: ts.Program): PartExport[
|
||||
// Skip type-only specifiers (e.g., `type GroupProps`)
|
||||
if (element.isTypeOnly) continue;
|
||||
|
||||
const localName = element.propertyName?.text ?? element.name.text;
|
||||
parts.push({
|
||||
name: element.name.text,
|
||||
localName,
|
||||
source,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user