Skip to content

Commit

Permalink
adding types
Browse files Browse the repository at this point in the history
  • Loading branch information
Janther committed Aug 27, 2023
1 parent 4108ba4 commit a03338a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
10 changes: 10 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
type Comment = {
type: 'BlockComment' | 'LineComment';
raw: string;
value: string;
range: [number, number];
};

declare function extractComments(str: string): Comment[];

export = extractComments;
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
"license": "MIT",
"repository": "github:prettier-solidity/solidity-comments-extractor",
"homepage": "https://github.com/prettier-solidity/solidity-comments-extractor",
"exports": {
"types": "./index.d.ts",
"default": "./index.js"
},
"scripts": {
"lint": "eslint '**/*.js'",
"prettier": "prettier '**/*.js'",
Expand Down

0 comments on commit a03338a

Please sign in to comment.