Skip to content

Commit 6f7647b

Browse files
Add declaration and types path in package.json.
1 parent 127a5e2 commit 6f7647b

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

index.d.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
declare module 'country-region-data' {
2+
export interface Region {
3+
name: string;
4+
shortCode: string;
5+
}
6+
7+
export interface Country {
8+
countryName: string;
9+
countryShortCode: string;
10+
regions: Region[];
11+
}
12+
13+
const countryRegionData: Country[];
14+
15+
export default countryRegionData;
16+
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "1.4.5",
44
"description": "List of countries, regions, and their shortcodes.",
55
"main": "data.json",
6+
"types": "./index.d.ts",
67
"scripts": {
78
"test": "grunt validate"
89
},

0 commit comments

Comments
 (0)