Open
Description
I want to generate this code. notice the optional method paramter.
export class Client {
constructor(axiosInstance?: AxiosInstance) {
}
}
This is my tsx:
<Class named="Client">
<ClassMethod name="constructor" params={[
<Identifier typeAnnotation="AxiosInstance">
axiosInstance
</Identifier>
]}>
</ClassMethod>
</Class>
This code was generated:
class Client {
constructor(axiosInstance: AxiosInstance) {
}
}
How do I generate optional method parameters?
It would be great if there were some kinds of docs or more examples on how to build common js/ts patterns.
Metadata
Assignees
Labels
No labels