Closed KiddoV closed 6 days ago
Here is another example:
Go input:
type JsonArray[T any] []T
func (a JsonArray[T]) MarshalJSON() ([]byte, error) {
if a == nil {
return []byte("[]"), nil
}
return json.MarshalNoEscape([]T(a))
}
TS output:
export type JsonArray = T[];
Should be:
export type JsonArray<T> = T[];
This should be fixed with #69 in version 0.2.16
.
I have:
After generate I got: