fix: added packageMeta type

This commit is contained in:
Griffith Tchen Pan
2019-06-22 10:43:59 +01:00
committed by Griffithtp
parent c0b0189cc6
commit 3c54b116c9
16 changed files with 83 additions and 65 deletions

View File

@@ -23,10 +23,10 @@ interface Dist {
unpackedSize: number;
}
interface Props {
export interface PackageInterface {
name: string;
version: string;
time: string;
time?: number | string;
author: Author;
description?: string;
keywords?: string[];
@@ -35,6 +35,7 @@ interface Props {
bugs?: Bugs;
dist?: Dist;
}
// interface Props {} & PackageInterface;
import {
Author,
@@ -56,7 +57,7 @@ import {
} from './styles';
import { isURL } from '../../utils/url';
const Package: React.FC<Props> = ({
const Package: React.FC<PackageInterface> = ({
author: { name: authorName, avatar: authorAvatar },
bugs,
description,