babel-plugin-jsdoc-to-assert
babel-plugin-jsdoc-to-assert copied to clipboard
Feature request: Support for `typedef`
I guess that's not yet supported? I couldn't find a test for typedef
definitions.
I use a lot of code like this to define backend's data transfer objects before I pass them to my client side model classes:
/**
* @typedef {Object} MyDataDTO
* @property {string} foo -
* @property {string} bar -
*/
/**
* @typedef {Object} MyResponseDTO
* @property {MyDataDTO} payload -
* @property {number} status -
*/
/**
*/
class MyData {
/**
* @param model {MyDataDTO}
*/
constructor (model) {
this._model = model;
}
// ...
}