diff --git a/types/react-github-button/index.d.ts b/types/react-github-button/index.d.ts new file mode 100644 index 0000000000..87548f2d03 --- /dev/null +++ b/types/react-github-button/index.d.ts @@ -0,0 +1,28 @@ +// Type definitions for react-github-button 0.1 +// Project: https://github.com/benjycui/react-github-button#readme +// Definitions by: Ifiok Jr. +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +import { Component } from 'react'; + +export interface ReactGitHubButtonProps { + /** + * The type of information to display + */ + type: 'stargazers' | 'watchers' | 'forks'; + /** + * The size of the button. Leave undefined for default. + */ + size?: 'large'; + /** + * Your GitHub id or organization name. + */ + namespace: string; + /** + * The name of your repository. + */ + repo: string; +} + +export default class GitHubButton extends Component {} diff --git a/types/react-github-button/react-github-button-tests.tsx b/types/react-github-button/react-github-button-tests.tsx new file mode 100644 index 0000000000..39b3d4464f --- /dev/null +++ b/types/react-github-button/react-github-button-tests.tsx @@ -0,0 +1,10 @@ +import GitHubButton from 'react-github-button'; + +const MyComponent = () => ( + +); diff --git a/types/react-github-button/tsconfig.json b/types/react-github-button/tsconfig.json new file mode 100644 index 0000000000..031f784407 --- /dev/null +++ b/types/react-github-button/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "jsx": "preserve", + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "react-github-button-tests.tsx"] +} diff --git a/types/react-github-button/tslint.json b/types/react-github-button/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/react-github-button/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }