ts-json-schema-generator
ts-json-schema-generator copied to clipboard
Mapped type based on interface method is empty
When trying to generate schema for mapped type like this, I get just an empty object:
export interface Functional {
fun(): string
}
export type FunctionalReturnTypes = {
[Key in keyof Functional]: ReturnType<Functional[Key]>
}
Note: even if I replace the ReturnType<Functional[Key]> with just string, the schema is empty, so it seems like the culprit is that the base interface is functional.