mirror of
https://github.com/NohamR/gitprofile.git
synced 2026-05-24 20:00:22 +00:00
Add type definitions
This commit is contained in:
@@ -21,6 +21,7 @@
|
|||||||
},
|
},
|
||||||
"./dist/style.css": "./dist/style.css"
|
"./dist/style.css": "./dist/style.css"
|
||||||
},
|
},
|
||||||
|
"typings": "./types/index.d.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
|
|||||||
57
types/index.d.ts
vendored
Normal file
57
types/index.d.ts
vendored
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
// Type definitions for GitProfile
|
||||||
|
// Project https://github.com/arifszn/gitprofile
|
||||||
|
// Author: Ariful Alam <arifulalamszn@gmail.com>
|
||||||
|
|
||||||
|
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<GitProfileProps> {}
|
||||||
|
|
||||||
|
export default GitProfile;
|
||||||
Reference in New Issue
Block a user