syavorsky/comment-parser

Incorrect return type for parse() function in index.d.ts

jhm-ciberman opened this issue · 1 comments

https://github.com/yavorskiy/comment-parser/blob/e7d81084ca6533661abf48617c40fa5336ba163e/index.d.ts#L175

I noticed this function should return parse.Comment[] (array of comments) instead of [parse.Comment] (array with a single comment).

Currently I don't have time to fix it. But I leave this issue here for anyone who can.

Also, the readme is incorrect (I think)

Module provides parse(s:String[, opts:Object]):Object function which takes /** ... */ comment string and returns array of objects with parsed data.`

should be:

Module provides parse(s: string[, opts: object]): object[] function which takes /** ... */ comment string and returns array of objects with parsed data.`