Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/typescript types #18

Merged
merged 2 commits into from
Oct 7, 2018
Merged

Feat/typescript types #18

merged 2 commits into from
Oct 7, 2018

Conversation

Esemesek
Copy link
Collaborator

@Esemesek Esemesek commented Oct 7, 2018

Add Typescript types.
Fixes #15.

@Esemesek Esemesek requested a review from thymikee October 7, 2018 20:23
import { ReactTestInstance } from 'react-test-renderer';

export interface GetByAPI {
getByName: (name: React.ReactType) => ReactTestInstance;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

name: React.ReactType | string, same for getAllByName

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, that's cool! Didn't know that :D

}

export interface QueryByAPI {
queryByName: (name: React.ReactType) => ReactTestInstance | null;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

@Esemesek Esemesek merged commit b6569a6 into master Oct 7, 2018
@Esemesek Esemesek deleted the feat/typescript-types branch October 7, 2018 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants