Skip to content

Commit a15f5b5

Browse files
fix: types
1 parent bfff1c5 commit a15f5b5

File tree

3 files changed

+12
-13
lines changed

3 files changed

+12
-13
lines changed

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "react-native-ui-datepicker",
3-
"version": "2.0.8",
3+
"version": "2.0.9",
44
"description": "Customizable date picker for React Native",
5-
"main": "lib/commonjs/index",
5+
"main": "lib/module/index",
66
"module": "lib/module/index",
77
"types": "lib/typescript/src/index.d.ts",
88
"react-native": "src/index",
@@ -163,14 +163,14 @@
163163
"source": "src",
164164
"output": "lib",
165165
"targets": [
166-
"commonjs",
167-
"module",
168166
[
169-
"typescript",
167+
"module",
170168
{
171-
"project": "tsconfig.build.json"
169+
"esm": true,
170+
"jsxRuntime": "classic"
172171
}
173-
]
172+
],
173+
"typescript"
174174
]
175175
},
176176
"dependencies": {

src/types.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,17 @@ export type SingleChange = (params: { date: DateType }) => void;
7171
export type RangeChange = (params: {
7272
startDate: DateType;
7373
endDate: DateType;
74-
}) => any;
74+
}) => void;
7575

7676
export type MultiChange = (params: {
7777
dates: DateType[];
7878
datePressed: DateType;
7979
change: 'added' | 'removed';
80-
}) => any;
80+
}) => void;
8181

8282
export interface DatePickerBaseProps {
8383
mode?: ModeType;
84-
locale?: string | ILocale;
84+
locale?: string | ILocale; // If ILocale is required, define it somewhere
8585
startYear?: number;
8686
endYear?: number;
8787
minDate?: DateType;

tsconfig.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
22
"compilerOptions": {
3-
"baseUrl": ".",
3+
"baseUrl": "./",
44
"paths": {
5-
"*": ["src/*"],
65
"react-native-ui-datepicker": ["./src/index"]
76
},
87
"allowUnreachableCode": false,
@@ -27,6 +26,6 @@
2726
"allowJs": true,
2827
"types": ["react-native", "jest", "node", "@testing-library/jest-native"]
2928
},
30-
"include": ["src/**/*"],
29+
"include": ["src"],
3130
"exclude": ["node_modules"]
3231
}

0 commit comments

Comments
 (0)