From 9f24ddbe46f300152a2ae0781cbaf107ea86ee6e Mon Sep 17 00:00:00 2001 From: Ariful Alam Date: Sat, 26 Mar 2022 13:30:43 +0600 Subject: [PATCH] Add type definitions --- package.json | 1 + types/index.d.ts | 57 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 types/index.d.ts diff --git a/package.json b/package.json index eeb535c..4c1550e 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ }, "./dist/style.css": "./dist/style.css" }, + "typings": "./types/index.d.ts", "scripts": { "dev": "vite", "build": "vite build", diff --git a/types/index.d.ts b/types/index.d.ts new file mode 100644 index 0000000..a0b2a1b --- /dev/null +++ b/types/index.d.ts @@ -0,0 +1,57 @@ +// Type definitions for GitProfile +// Project https://github.com/arifszn/gitprofile +// Author: Ariful Alam + +import { Component } from 'react'; + +interface github { + /** + * GitHub org/user name + */ + username: string; + + /** + * stars | updated + */ + sortBy: string; + + /** + * How many projects to display + */ + limit: number; + + /** + * Exclude projects option + */ + exclude: { + /** + * Forked projects will not be displayed if set to true + */ + forks: boolean; + + /** + * These projects will not be displayed + * + * example: ['my-project1', 'my-project2'] + */ + projects: Array; + }; +} + +interface config { + /** + * GitHub Config + */ + github: github; +} + +interface GitProfileProps { + /** + * Config values + */ + config: config; +} + +declare class GitProfile extends Component {} + +export default GitProfile;