Skip to content

Commit

Permalink
Consolidate TypeScript definitions into a single file and upgrade rea…
Browse files Browse the repository at this point in the history
…ct-contentful version
  • Loading branch information
ryanhefner committed Apr 23, 2019
1 parent 156fe0c commit 2516a04
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 33 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"@types/react": "^16.8.14",
"flatted": "^2.0.0",
"prop-types": "^15.6.2",
"react-contentful": "^1.3.0-beta.3"
"react-contentful": "^1.3.0-beta.5"
},
"devDependencies": {
"@babel/cli": "^7.4.3",
Expand Down
29 changes: 23 additions & 6 deletions types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
// TypeScript Version: 3.0

import * as initContentful from './initContentful';
import * as withContentful from './withContentful';
import { Component } from 'react';
import { ContentfulClientInterface } from 'react-contentful';

export {
initContentful,
withContentful,
};
/**
* initContentful
*/

export interface initContentfulParams {
initialState: any;
}

export function initContentful(params: initContentfulParams): ContentfulClientInterface;

/**
* withContentful
*/

export interface withContentfulParams {
accessToken: string;
host: string;
space: string;
}

export function withContentful(params: withContentfulParams): Component;
9 changes: 0 additions & 9 deletions types/initContentful.d.ts

This file was deleted.

14 changes: 0 additions & 14 deletions types/withContentful.d.ts

This file was deleted.

0 comments on commit 2516a04

Please sign in to comment.