I have an interface such as this:
import { authoringContentReducer } from './auth.content.reducer';
export const AUTH_CONTENT_FEATURE = 'authContent';
export const authContentFeatureReducer = {
[AUTH_CONTENT_FEATURE]: authoringContentReducer
};
with
import { Reducer } from 'redux';
...
export const authoringContentReducer: Reducer<
AuthoringContentState,
| AddAuthoringContentAction
| SetAuthoringContentAction
| RemoveAuthoringContentAction
> = ...;
the authContentFeatureReducer is appears in the api export as
{
"kind": "Variable",
"canonicalReference": "authContentFeatureReducer",
"docComment": "",
"excerptTokens": [
{
"kind": "Reference",
"text": "authContentFeatureReducer"
},
{
"kind": "Content",
"text": ": "
},
{
"kind": "Content",
"text": "{\n ["
},
{
"kind": "Reference",
"text": "AUTH_CONTENT_FEATURE"
},
{
"kind": "Content",
"text": "]: import(\"redux\")."
},
{
"kind": "Reference",
"text": "Reducer"
},
i.e. the reference to the Reducer type from redux is includes as an import in the type declaration instead of just using the Reducer value.
This is in particular problematic in the documentation generated from this structure, the fully rendered doc in my example is:
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>>;
}
which is basically unreadable.
I would have preferred the types to be referenced (and in particular documented) just by their name, not their import path.
I have an interface such as this:
with
the
authContentFeatureReduceris appears in the api export as{ "kind": "Variable", "canonicalReference": "authContentFeatureReducer", "docComment": "", "excerptTokens": [ { "kind": "Reference", "text": "authContentFeatureReducer" }, { "kind": "Content", "text": ": " }, { "kind": "Content", "text": "{\n [" }, { "kind": "Reference", "text": "AUTH_CONTENT_FEATURE" }, { "kind": "Content", "text": "]: import(\"redux\")." }, { "kind": "Reference", "text": "Reducer" },i.e. the reference to the
Reducertype fromreduxis includes as an import in the type declaration instead of just using theReducervalue.This is in particular problematic in the documentation generated from this structure, the fully rendered doc in my example is:
which is basically unreadable.
I would have preferred the types to be referenced (and in particular documented) just by their name, not their import path.