Reputation: 1059
I have the following code:
/**
* @interface an interface for Foo
*/
interface IFoo {
init: () => void;
}
class Foo implements IFoo {
public init(): void {}
}
I want to describe init
method with a type like I would for any other param @param {type} name - description
, but @param
doesn't seem to be a good thing for the method description and the @method
can not properly display the type, after trying
* @method {() => void} init - method for initialization
I get this kind of description:
Is there a proper way for describing interface methods with a type?
Upvotes: 0
Views: 192
Reputation: 5429
You can omit @
tags and place description in the comment above method or/and interface
/**
* An interface for Foo
*/
interface IFoo {
/**
* method for initialization
*/
init: () => void;
}
Upvotes: 1