eclipse-typescript icon indicating copy to clipboard operation
eclipse-typescript copied to clipboard

Option to inject JsDoc in code

Open paztis opened this issue 10 years ago • 5 comments

It would be nice to have an option to inject JsDoc on wanted items (class, interface, module, variable, function, ...). Asx a right click on the wanted item. It can write the template with the default fileds (@param, @typedef, ...) adapted to the selected item. Example:

/** @namespace My.Namespace / module My.Namespace { /* @class SomeClass */ export class SomeClass { } }

paztis avatar Dec 16 '14 14:12 paztis

Do you mean like the @params are automatically injected when adding a jsdoc for a method? Something like that?

derekcicerone-zz avatar Dec 16 '14 15:12 derekcicerone-zz

Yes.

paztis avatar Dec 16 '14 15:12 paztis

Ah yeah cool, same as Java then. That's a good request. I think the signature info could probably be used to do this without too much trouble. Lemme know if you'd be interested in submitting a pull request for this. I'm not likely to get to this for a while. I should mention we have a CLA now though (I need to post it to the repo).

derekcicerone-zz avatar Dec 16 '14 15:12 derekcicerone-zz

ok I will write a pull request tomorrow (with all informations about JsDoc tags if you want)

paztis avatar Dec 16 '14 15:12 paztis

Sounds good to me

derekcicerone-zz avatar Dec 16 '14 16:12 derekcicerone-zz