index.d.ts 706 B

1234567891011121314151617181920212223242526272829
  1. // Type definitions for comment-parser
  2. // Project: comment-parser
  3. // Definitions by: Javier "Ciberman" Mora <https://github.com/jhm-ciberman/>
  4. declare namespace CommentParser {
  5. export interface Comment {
  6. tags: Tag[];
  7. line: number;
  8. description: string;
  9. source: string;
  10. }
  11. export interface Tag {
  12. tag: string;
  13. name: string;
  14. optional: boolean;
  15. type: string;
  16. description: string;
  17. line: number;
  18. source: string;
  19. }
  20. export interface Options {
  21. parsers?: [(str: string, data: any) => { source: string, data: any }];
  22. dotted_names?: boolean;
  23. }
  24. }
  25. declare function parse(str: string, opts?: CommentParser.Options): [CommentParser.Comment];
  26. export = parse;