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
{{ message }}
Repository navigation
[api-extractor] types are exported as 'import' clause instead of the imported symbol #1067
What do you see in your .d.ts files? I suspect the compiler is performing this transformation, not API Extractor. Also, which version of the compiler are you using?
export declare const authContentFeatureReducer: { [AUTH_CONTENT_FEATURE]: import("redux").Reducer<Record<string, import("@ibm-wch-sdk/api").AuthoringContentItem>, import("..").PayloadAction<import("@ibm-wch-sdk/api").AuthoringContentItem> | import("..").PayloadAction<string>>; };
I am using typescript@3.2.4 and ng-packagr to actually execute the build.
Is this something that can be configured on the tsconfig level?
I think this is an aspect of the compiler that could be improved. I would encourage you to open a GitHub issue for the TypeScript project, and first check whether anyone else has reported it if any workarounds are known.
I remember that I encountered the same problem with one of the API Extractor APIs and was able to eliminate it by simplifying the type expressions. It involved a new language feature that was just introduced in TS 3.x, so maybe the emitter is not optimized yet.
We could try to fix it up in API Extractor, but really the compiler needs to generate human readable .d.ts files in my opinion.
Activity
octogonz commentedon Feb 11, 2019
What do you see in your .d.ts files? I suspect the compiler is performing this transformation, not API Extractor. Also, which version of the compiler are you using?
CarstenLeue commentedon Feb 11, 2019
Indeed the
.d.tsfiles look strange, already:export declare const authContentFeatureReducer: { [AUTH_CONTENT_FEATURE]: import("redux").Reducer<Record<string, import("@ibm-wch-sdk/api").AuthoringContentItem>, import("..").PayloadAction<import("@ibm-wch-sdk/api").AuthoringContentItem> | import("..").PayloadAction<string>>; };I am using
typescript@3.2.4andng-packagrto actually execute the build.Is this something that can be configured on the tsconfig level?
octogonz commentedon Feb 11, 2019
I think this is an aspect of the compiler that could be improved. I would encourage you to open a GitHub issue for the TypeScript project, and first check whether anyone else has reported it if any workarounds are known.
I remember that I encountered the same problem with one of the API Extractor APIs and was able to eliminate it by simplifying the type expressions. It involved a new language feature that was just introduced in TS 3.x, so maybe the emitter is not optimized yet.
We could try to fix it up in API Extractor, but really the compiler needs to generate human readable .d.ts files in my opinion.
weeebdev commentedon Jul 19, 2021
Any workarounds about this?