diff --git a/types/react-motion-loop/index.d.ts b/types/react-motion-loop/index.d.ts new file mode 100644 index 0000000000..acb7910911 --- /dev/null +++ b/types/react-motion-loop/index.d.ts @@ -0,0 +1,17 @@ +// Type definitions for react-motion-loop 2.0 +// Project: https://github.com/nkbt/react-motion-loop +// Definitions by: Jeremy Allard +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 3.1 + +import { Component, ReactElement } from "react"; +import { MotionProps, PlainStyle, Style } from "react-motion"; + +interface ReactMotionLoopProps extends Partial { + styleFrom: Style; + styleTo: Style; + children?: (interpolatedStyle: PlainStyle) => ReactElement; +} +export class ReactMotionLoop extends Component {} + +export as namespace ReactMotionLoop; diff --git a/types/react-motion-loop/react-motion-loop-tests.tsx b/types/react-motion-loop/react-motion-loop-tests.tsx new file mode 100644 index 0000000000..b00bd0645a --- /dev/null +++ b/types/react-motion-loop/react-motion-loop-tests.tsx @@ -0,0 +1,16 @@ +import * as React from "react"; +import { ReactMotionLoop } from "react-motion-loop"; +import { spring } from "react-motion"; + +const TestComponent: React.FunctionComponent = props => ( + + {interpolatedStyle => ( +

+ )} + +); diff --git a/types/react-motion-loop/tsconfig.json b/types/react-motion-loop/tsconfig.json new file mode 100644 index 0000000000..51191b85ce --- /dev/null +++ b/types/react-motion-loop/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "jsx": "react", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "react-motion-loop-tests.tsx"] +} diff --git a/types/react-motion-loop/tslint.json b/types/react-motion-loop/tslint.json new file mode 100644 index 0000000000..4c4fc86ace --- /dev/null +++ b/types/react-motion-loop/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "strict-export-declare-modifiers": false + } +}