diff --git a/types/react-compass/index.d.ts b/types/react-compass/index.d.ts new file mode 100644 index 0000000000..676927155e --- /dev/null +++ b/types/react-compass/index.d.ts @@ -0,0 +1,17 @@ +// Type definitions for react-compass 0.1 +// Project: https://github.com/virtyaluk/react-compass +// Definitions by: Rick Wilson +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import * as React from "react"; + +export interface ReactCompassProps { + direction: number; + directionNames?: string[]; +} + +export function directionName(dir: number): string; +export function normalizeAngle(direction: number): number; + +export class ReactCompass extends React.Component {} +export default ReactCompass; diff --git a/types/react-compass/react-compass-tests.tsx b/types/react-compass/react-compass-tests.tsx new file mode 100644 index 0000000000..a757f0d438 --- /dev/null +++ b/types/react-compass/react-compass-tests.tsx @@ -0,0 +1,10 @@ +import * as React from "react"; +import ReactCompass from 'react-compass'; + +interface CompassProps { + direction: number; +} + +const CompassComp: React.FC = (props) => { + return (); +}; diff --git a/types/react-compass/tsconfig.json b/types/react-compass/tsconfig.json new file mode 100644 index 0000000000..a2d644d862 --- /dev/null +++ b/types/react-compass/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "jsx": "react", + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "react-compass-tests.tsx" + ] +} diff --git a/types/react-compass/tslint.json b/types/react-compass/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/react-compass/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }