lbovet / typson

Converts TypeScript to JSON-schema

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

typson can't handle functions?

emadurandal opened this issue · comments

I'd like to handle the following code using typson.

interface Foo {
foo(): void;
}

But, the typson outputs some error.
Doesn't typson support functions?

Typson aims at converting structure types to json schemas, as this latter does not support functions, they are consequently not translated by Typson.

However, having functions in your types should not prevent Typson to convert them. Can you produce an example so I can have a look?

Well, I can reproduce easily. This has to be fixed.

Any news on this?

This issue is still reproducible

interface Foo {
    
    init();
    
}

will cause typson to fail.