TypeScript Code:
export type Handler = (props: {}) => string
export type HandlerObject = {
prop: Handler
};
Command
typescript-json-schema index.ts HandlerObject
Expected Result:
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object"
}
Actual Result:
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"prop": {
"type": "object"
}
},
"type": "object"
}
Use method definition that is ignored YousefED/typescript-json-schema#194.
export type HandlerObject = {
prop(props: {}): string
};
See Releases page.
Install devDependencies and Run npm test
:
npm test
Pull requests and stars are always welcome.
For bugs and feature requests, please create an issue.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
MIT © azu