diff --git a/types/react-calendar-heatmap/index.d.ts b/types/react-calendar-heatmap/index.d.ts new file mode 100644 index 0000000000..f15ff887ca --- /dev/null +++ b/types/react-calendar-heatmap/index.d.ts @@ -0,0 +1,30 @@ +// Type definitions for react-calendar-heatmap 1.6 +// Project: https://github.com/patientslikeme/react-calendar-heatmap +// Definitions by: Keisuke Kan +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +import * as React from 'react'; + +export interface Props { + classForValue?: (value: any) => any; + endDate?: string | number | Date; + gutterSize?: number; + horizontal?: boolean; + monthLabels?: string[]; + numDays?: number; + onClick?: (value: any) => void; + onMouseLeave?: (e: any, value: any) => void; + onMouseOver?: (e: any, value: any) => void; + showMonthLabels?: boolean; + showOutOfRangeDays?: boolean; + showWeekdayLabels?: boolean; + startDate?: string | number | Date; + titleForValue?: (value: any) => any; + tooltipDataAttrs?: object; + transformDayElement?: (rect: any, value: any, index: number) => any; + values: any[]; + weekdayLabels?: string[]; +} + +export default class ReactCalendarHeatmap extends React.Component {} diff --git a/types/react-calendar-heatmap/react-calendar-heatmap-tests.tsx b/types/react-calendar-heatmap/react-calendar-heatmap-tests.tsx new file mode 100644 index 0000000000..4e807ddfcd --- /dev/null +++ b/types/react-calendar-heatmap/react-calendar-heatmap-tests.tsx @@ -0,0 +1,16 @@ +import * as React from 'react'; +import CalendarHeatmap from 'react-calendar-heatmap'; + +export default function() { + return ( + + ); +} diff --git a/types/react-calendar-heatmap/tsconfig.json b/types/react-calendar-heatmap/tsconfig.json new file mode 100644 index 0000000000..f605aa4478 --- /dev/null +++ b/types/react-calendar-heatmap/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "jsx": "react" + }, + "files": [ + "index.d.ts", + "react-calendar-heatmap-tests.tsx" + ] +} \ No newline at end of file diff --git a/types/react-calendar-heatmap/tslint.json b/types/react-calendar-heatmap/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/react-calendar-heatmap/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +}