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 running the generator on parameters that implement an interface like below, we noticed that the generator produces errors like error: Unsupported field type TSMethodSignature in Handler. In the --lenient mode this does allow us to generate .jsonld files, but they miss all of the parameters deriving from the interface.
import type { Observable } from 'rxjs';
export interface Handler<T = void, S = void> {
handle(input: T): Observable<S>;
}
This issue is actually slightly more complex than I first thought.
Parameters that refer to interfaces are converted into nested record definitions, whereas this is a case where you actually want the param to accept instantiations of components that implement this interface. So we'll probably need a new TSDoc flag for this.
So basically, when this TSDoc flag is enabled on a param, an interface reference would behave just like an abstract class reference.
Problem description
When running the generator on parameters that implement an interface like below, we noticed that the generator produces errors like
error: Unsupported field type TSMethodSignature in Handler
. In the--lenient
mode this does allow us to generate.jsonld
files, but they miss all of the parameters deriving from the interface.Example code
HandlersJS - Handler.ts
Environment:
The text was updated successfully, but these errors were encountered: