You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when publicTrimmedFilePath is used and public API surfaces contain type information that are produced from types that contain @internal annotation , api-extractor generates invalid .d.ts rollup file.
uncomment lines below this comment // uncomment next line - https://github.com/microsoft/rushstack/issues/3445 within packages/one/src/index.ts
run yarn build
check output in packages/one/dist/untrimmed.ts and packages/one/dist/public.ts
Actual result:
Expected result:
one of:
inline @internal types to existing definition:
-export declare type WeekDay = WorkDay | WeekendDay;+export declare type WeekDay = 'monday' | 'tuesday| ' saturday' | 'sunday';
export interface Baseball {
foo: Hello;
- bar: WorkDay;+ bar: 'monday' | 'tuesday| ' saturday' | 'sunday';
}
remove parts of public API's that contain @internal
NOTE: This feels rather wrong so I dont think this is right approach
-export declare type WeekDay = WorkDay | WeekendDay;
export interface Baseball {
foo: Hello;
- bar: WorkDay;
}
throw error to notify user that he is doing something wrong - exposing public API's that contain @internal types within public API surface
both previous solutions (1 or 2) might be non trivial to implement, so at least providing correct guidance would provide good enough DX
Details
Standard questions
Please answer these questions to help us investigate your issue more quickly:
Question
Answer
@microsoft/api-extractor version?
7.24.2
Operating system?
Linux/Mac
API Extractor scenario?
rollups (.d.ts)
Would you consider contributing a PR?
Maybe
TypeScript compiler version?
4.6.4
Node.js version (node -v)?
14.8.1
The text was updated successfully, but these errors were encountered:
Summary
when
publicTrimmedFilePath
is used and public API surfaces contain type information that are produced from types that contain@internal
annotation , api-extractor generates invalid.d.ts
rollup file.Repro steps
Link to whole repro
Steps:
// uncomment next line - https://github.com/microsoft/rushstack/issues/3445
withinpackages/one/src/index.ts
yarn build
packages/one/dist/untrimmed.ts
andpackages/one/dist/public.ts
Actual result:
Expected result:
one of:
@internal
types to existing definition:@internal
@internal
types within public API surfaceDetails
Standard questions
Please answer these questions to help us investigate your issue more quickly:
@microsoft/api-extractor
version?node -v
)?The text was updated successfully, but these errors were encountered: