Skip to content

Commit 7adff78

Browse files
YashdalfTheGraytwhiteman
authored andcommitted
added typescript typings to the project
1 parent f405dfe commit 7adff78

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

index.d.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Type definitions for docker-file-parser 1.0
2+
3+
export interface CommandEntry {
4+
name: string;
5+
args: string[];
6+
lineno: number;
7+
raw: string;
8+
error?: string;
9+
}
10+
11+
export interface ParseOptions {
12+
includeComments: boolean;
13+
}
14+
15+
export function parse(
16+
contents: string,
17+
options?: ParseOptions
18+
): CommandEntry[];

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
}
2323
],
2424
"main": "index.js",
25+
"types": "index.d.ts",
2526
"scripts": {
2627
"test": "set -e; for t in test/test_*.js; do node $t; done"
2728
},

0 commit comments

Comments
 (0)