Skip to content

Commit

Permalink
fix: types
Browse files Browse the repository at this point in the history
  • Loading branch information
farhoudshapouran committed Feb 1, 2025
1 parent bfff1c5 commit a15f5b5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "react-native-ui-datepicker",
"version": "2.0.8",
"version": "2.0.9",
"description": "Customizable date picker for React Native",
"main": "lib/commonjs/index",
"main": "lib/module/index",
"module": "lib/module/index",
"types": "lib/typescript/src/index.d.ts",
"react-native": "src/index",
Expand Down Expand Up @@ -163,14 +163,14 @@
"source": "src",
"output": "lib",
"targets": [
"commonjs",
"module",
[
"typescript",
"module",
{
"project": "tsconfig.build.json"
"esm": true,
"jsxRuntime": "classic"
}
]
],
"typescript"
]
},
"dependencies": {
Expand Down
6 changes: 3 additions & 3 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,17 @@ export type SingleChange = (params: { date: DateType }) => void;
export type RangeChange = (params: {
startDate: DateType;
endDate: DateType;
}) => any;
}) => void;

export type MultiChange = (params: {
dates: DateType[];
datePressed: DateType;
change: 'added' | 'removed';
}) => any;
}) => void;

export interface DatePickerBaseProps {
mode?: ModeType;
locale?: string | ILocale;
locale?: string | ILocale; // If ILocale is required, define it somewhere
startYear?: number;
endYear?: number;
minDate?: DateType;
Expand Down
5 changes: 2 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"compilerOptions": {
"baseUrl": ".",
"baseUrl": "./",
"paths": {
"*": ["src/*"],
"react-native-ui-datepicker": ["./src/index"]
},
"allowUnreachableCode": false,
Expand All @@ -27,6 +26,6 @@
"allowJs": true,
"types": ["react-native", "jest", "node", "@testing-library/jest-native"]
},
"include": ["src/**/*"],
"include": ["src"],
"exclude": ["node_modules"]
}

0 comments on commit a15f5b5

Please sign in to comment.