Skip to content

Commit 28e0674

Browse files
euZebeKent C. Dodds
authored andcommitted
docs: add typescript installation instructions (#32)
<!-- Thanks for your interest in the project. Bugs filed and PRs submitted are appreciated! Please make sure that you are familiar with and follow the Code of Conduct for this project (found in the CODE_OF_CONDUCT.md file). Also, please make sure you're familiar with and follow the instructions in the contributing guidelines (found in the CONTRIBUTING.md file). If you're new to contributing to open source projects, you might find this free video course helpful: http://kcd.im/pull-request Please fill out the information below to expedite the review and (hopefully) merge of your pull request! --> <!-- What changes are being made? (What feature/bug is being fixed here?) --> **What**: documentation for typescript users, so that cypress-testing-library commands don't make TypesScript transpilation fail. <!-- Why are these changes necessary? --> **Why**: to help cypress + typescript users deal with this library <!-- How were these changes implemented? --> <!-- Have you done all of these things? --> **Checklist**: <!-- add "N/A" to the end of each line that's irrelevant to your changes --> <!-- to check an item, place an "x" in the box like so: "- [x] Documentation" --> * [x] Documentation * [ ] Tests * [ ] Ready to be merged <!-- In your opinion, is this ready to be merged as soon as it's reviewed? --> * [ ] Added myself to contributors table <!-- this is optional, see the contributing guidelines for instructions --> <!-- feel free to add additional comments -->
1 parent 1a2fc93 commit 28e0674

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

.all-contributorsrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,15 @@
9191
"code",
9292
"test"
9393
]
94+
},
95+
{
96+
"login": "euZebe",
97+
"name": "euzebe",
98+
"avatar_url": "https://avatars3.githubusercontent.com/u/9463809?v=4",
99+
"profile": "https://github.com/euZebe",
100+
"contributions": [
101+
"doc"
102+
]
94103
}
95104
],
96105
"repoType": "github"

README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
[![downloads][downloads-badge]][npmtrends]
2020
[![MIT License][license-badge]][license]
2121

22-
[![All Contributors](https://img.shields.io/badge/all_contributors-8-orange.svg?style=flat-square)](#contributors)
22+
[![All Contributors](https://img.shields.io/badge/all_contributors-9-orange.svg?style=flat-square)](#contributors)
2323
[![PRs Welcome][prs-badge]][prs]
2424
[![Code of Conduct][coc-badge]][coc]
2525

@@ -47,6 +47,7 @@ This allows you to use all the useful [`dom-testing-library`][dom-testing-librar
4747
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
4848

4949
- [Installation](#installation)
50+
- [With typescript](#with-typescript)
5051
- [Usage](#usage)
5152
- [Other Solutions](#other-solutions)
5253
- [Contributors](#contributors)
@@ -63,6 +64,18 @@ should be installed as one of your project's `devDependencies`:
6364
npm install --save-dev cypress-testing-library
6465
```
6566

67+
### With typescript
68+
69+
Typings are defined under `cypress-testing-library/typings`, and should be added as follows in `tsconfig.json`:
70+
71+
```json
72+
{
73+
"compilerOptions": {
74+
"types": ["cypress", "../cypress-testing-library/typings"]
75+
}
76+
}
77+
```
78+
6679
## Usage
6780

6881
`cypress-testing-library` extends Cypress' `cy` command.
@@ -105,7 +118,7 @@ Thanks goes to these people ([emoji key][emojis]):
105118
<!-- prettier-ignore -->
106119
| [<img src="https://avatars.githubusercontent.com/u/1500684?v=3" width="100px;"/><br /><sub><b>Kent C. Dodds</b></sub>](https://kentcdodds.com)<br />[💻](https://github.com/kentcdodds/cypress-testing-library/commits?author=kentcdodds "Code") [📖](https://github.com/kentcdodds/cypress-testing-library/commits?author=kentcdodds "Documentation") [🚇](#infra-kentcdodds "Infrastructure (Hosting, Build-Tools, etc)") [⚠️](https://github.com/kentcdodds/cypress-testing-library/commits?author=kentcdodds "Tests") | [<img src="https://avatars2.githubusercontent.com/u/498274?v=4" width="100px;"/><br /><sub><b>Ivan Babak</b></sub>](https://sompylasar.github.io)<br />[💻](https://github.com/kentcdodds/cypress-testing-library/commits?author=sompylasar "Code") [🤔](#ideas-sompylasar "Ideas, Planning, & Feedback") | [<img src="https://avatars1.githubusercontent.com/u/4002543?v=4" width="100px;"/><br /><sub><b>Łukasz Gandecki</b></sub>](http://team.thebrain.pro)<br />[💻](https://github.com/kentcdodds/cypress-testing-library/commits?author=lgandecki "Code") [⚠️](https://github.com/kentcdodds/cypress-testing-library/commits?author=lgandecki "Tests") | [<img src="https://avatars1.githubusercontent.com/u/25429764?v=4" width="100px;"/><br /><sub><b>Peter Kamps</b></sub>](https://github.com/npeterkamps)<br />[💻](https://github.com/kentcdodds/cypress-testing-library/commits?author=npeterkamps "Code") [📖](https://github.com/kentcdodds/cypress-testing-library/commits?author=npeterkamps "Documentation") [🤔](#ideas-npeterkamps "Ideas, Planning, & Feedback") [⚠️](https://github.com/kentcdodds/cypress-testing-library/commits?author=npeterkamps "Tests") | [<img src="https://avatars3.githubusercontent.com/u/4506749?v=4" width="100px;"/><br /><sub><b>Airat Aminev</b></sub>](https://github.com/airato)<br />[💻](https://github.com/kentcdodds/cypress-testing-library/commits?author=airato "Code") [⚠️](https://github.com/kentcdodds/cypress-testing-library/commits?author=airato "Tests") [🔧](#tool-airato "Tools") | [<img src="https://avatars0.githubusercontent.com/u/5121148?v=4" width="100px;"/><br /><sub><b>Adrian Smijulj</b></sub>](https://www.webiny.com)<br />[💻](https://github.com/kentcdodds/cypress-testing-library/commits?author=adrian1358 "Code") | [<img src="https://avatars0.githubusercontent.com/u/12230408?v=4" width="100px;"/><br /><sub><b>Soo Jae Hwang</b></sub>](https://www.ossfinder.com)<br />[🐛](https://github.com/kentcdodds/cypress-testing-library/issues?q=author%3Amisoguy "Bug reports") [💻](https://github.com/kentcdodds/cypress-testing-library/commits?author=misoguy "Code") [⚠️](https://github.com/kentcdodds/cypress-testing-library/commits?author=misoguy "Tests") |
107120
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
108-
| [<img src="https://avatars1.githubusercontent.com/u/1288694?v=4" width="100px;"/><br /><sub><b>Justin Hall</b></sub>](https://github.com/wKovacs64)<br />[💻](https://github.com/kentcdodds/cypress-testing-library/commits?author=wKovacs64 "Code") [⚠️](https://github.com/kentcdodds/cypress-testing-library/commits?author=wKovacs64 "Tests") |
121+
| [<img src="https://avatars1.githubusercontent.com/u/1288694?v=4" width="100px;"/><br /><sub><b>Justin Hall</b></sub>](https://github.com/wKovacs64)<br />[💻](https://github.com/kentcdodds/cypress-testing-library/commits?author=wKovacs64 "Code") [⚠️](https://github.com/kentcdodds/cypress-testing-library/commits?author=wKovacs64 "Tests") | [<img src="https://avatars3.githubusercontent.com/u/9463809?v=4" width="100px;"/><br /><sub><b>euzebe</b></sub>](https://github.com/euZebe)<br />[📖](https://github.com/kentcdodds/cypress-testing-library/commits?author=euZebe "Documentation") |
109122

110123
<!-- ALL-CONTRIBUTORS-LIST:END -->
111124

0 commit comments

Comments
 (0)