Issue type:
Description:
This could be solved in either the generator or components.js. No idea which one would be easier.
There is a class AsyncHandler defined as
export abstract class AsyncHandler<TIn = void, TOut = void>
There is a class HttpHandler defined as
export abstract class HttpHandler extends AsyncHandler<HttpHandlerInput>
Building that class with the components.js generator generates the following extends predicate for the HttpHandler:
{
"@type": "GenericComponentExtension",
"component": "scs:dist/util/handlers/AsyncHandler.jsonld#AsyncHandler",
"genericTypeInstances": [
"scs:dist/server/HttpHandler.jsonld#HttpHandlerInput"
]
}
Trying to run a config with an instance of that class gives the following error:
ErrorResourcesContext: Invalid generic type instantiation: a different amount of generic types are passed (1) than are defined on the component (2).
Changing the HttpHandler to extend AsyncHandler<HttpHandlerInput, void> generates 2 entries in the genericTypeInstances array and makes the error go away.
Environment:
Components.js version 5.0.0-beta.5
Components.js generator version 3.0.0-beta.7
Issue type:
Description:
This could be solved in either the generator or components.js. No idea which one would be easier.
There is a class
AsyncHandlerdefined asThere is a class
HttpHandlerdefined asBuilding that class with the components.js generator generates the following
extendspredicate for theHttpHandler:{ "@type": "GenericComponentExtension", "component": "scs:dist/util/handlers/AsyncHandler.jsonld#AsyncHandler", "genericTypeInstances": [ "scs:dist/server/HttpHandler.jsonld#HttpHandlerInput" ] }Trying to run a config with an instance of that class gives the following error:
Changing the
HttpHandlerto extendAsyncHandler<HttpHandlerInput, void>generates 2 entries in thegenericTypeInstancesarray and makes the error go away.Environment:
Components.js version
5.0.0-beta.5Components.js generator version
3.0.0-beta.7