Skip to content

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.

2 participants