From 6115bd3acf942509fdb99fca27a2a795ff01247e Mon Sep 17 00:00:00 2001 From: Keisuke Kan <9renpoto@gmail.com> Date: Thu, 9 Nov 2017 21:38:16 +0900 Subject: [PATCH] Added react-calendar-heatmap --- types/react-calendar-heatmap/index.d.ts | 32 ++++++++ .../react-calendar-heatmap-tests.tsx | 16 ++++ types/react-calendar-heatmap/tsconfig.json | 25 ++++++ types/react-calendar-heatmap/tslint.json | 79 +++++++++++++++++++ 4 files changed, 152 insertions(+) create mode 100644 types/react-calendar-heatmap/index.d.ts create mode 100644 types/react-calendar-heatmap/react-calendar-heatmap-tests.tsx create mode 100644 types/react-calendar-heatmap/tsconfig.json create mode 100644 types/react-calendar-heatmap/tslint.json diff --git a/types/react-calendar-heatmap/index.d.ts b/types/react-calendar-heatmap/index.d.ts new file mode 100644 index 0000000000..9a977deeb1 --- /dev/null +++ b/types/react-calendar-heatmap/index.d.ts @@ -0,0 +1,32 @@ +// Type definitions for react-calendar-heatmap v1.6.1 +// Project: https://github.com/patientslikeme/react-calendar-heatmap +// Definitions by: Keisuke Kan +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +/// + +declare module "react-calendar-heatmap" { + interface Props { + classForValue?: Function + endDate?: string | number | Date + gutterSize?: number + horizontal?: boolean + monthLabels?: string[] + numDays?: number + onClick?: Function + onMouseLeave?: Function, + onMouseOver?: Function, + showMonthLabels?: boolean + showOutOfRangeDays?: boolean + showWeekdayLabels?: boolean, + startDate?: string | number | Date, + titleForValue?: Function, + tooltipDataAttrs?: Object | Function + transformDayElement?: Function, + values: any[] + weekdayLabels?: string[] + } + let ReactCalendarHeatmap : React.ClassicComponentClass; + export default ReactCalendarHeatmap; +} \ No newline at end of file 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..6d66508ca0 --- /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 ( + + ) +} \ No newline at end of file diff --git a/types/react-calendar-heatmap/tsconfig.json b/types/react-calendar-heatmap/tsconfig.json new file mode 100644 index 0000000000..ad3ac4522c --- /dev/null +++ b/types/react-calendar-heatmap/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "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..a41bf5d19a --- /dev/null +++ b/types/react-calendar-heatmap/tslint.json @@ -0,0 +1,79 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "adjacent-overload-signatures": false, + "array-type": false, + "arrow-return-shorthand": false, + "ban-types": false, + "callable-types": false, + "comment-format": false, + "dt-header": false, + "eofline": false, + "export-just-namespace": false, + "import-spacing": false, + "interface-name": false, + "interface-over-type-literal": false, + "jsdoc-format": false, + "max-line-length": false, + "member-access": false, + "new-parens": false, + "no-any-union": false, + "no-boolean-literal-compare": false, + "no-conditional-assignment": false, + "no-consecutive-blank-lines": false, + "no-construct": false, + "no-declare-current-package": false, + "no-duplicate-imports": false, + "no-duplicate-variable": false, + "no-empty-interface": false, + "no-for-in-array": false, + "no-inferrable-types": false, + "no-internal-module": false, + "no-irregular-whitespace": false, + "no-mergeable-namespace": false, + "no-misused-new": false, + "no-namespace": false, + "no-object-literal-type-assertion": false, + "no-padding": false, + "no-redundant-jsdoc": false, + "no-redundant-jsdoc-2": false, + "no-redundant-undefined": false, + "no-reference-import": false, + "no-relative-import-in-test": false, + "no-self-import": false, + "no-single-declare-module": false, + "no-string-throw": false, + "no-unnecessary-callback-wrapper": false, + "no-unnecessary-class": false, + "no-unnecessary-generics": false, + "no-unnecessary-qualifier": false, + "no-unnecessary-type-assertion": false, + "no-useless-files": false, + "no-var-keyword": false, + "no-var-requires": false, + "no-void-expression": false, + "no-trailing-whitespace": false, + "object-literal-key-quotes": false, + "object-literal-shorthand": false, + "one-line": false, + "one-variable-per-declaration": false, + "only-arrow-functions": false, + "prefer-conditional-expression": false, + "prefer-const": false, + "prefer-declare-function": false, + "prefer-for-of": false, + "prefer-method-signature": false, + "prefer-template": false, + "radix": false, + "semicolon": false, + "space-before-function-paren": false, + "space-within-parens": false, + "strict-export-declare-modifiers": false, + "trim-file": false, + "triple-equals": false, + "typedef-whitespace": false, + "unified-signatures": false, + "void-return": false, + "whitespace": false + } +}