From 6e19386cba137209b71602ce0d6f293d29cb2843 Mon Sep 17 00:00:00 2001 From: Maurice de Beijer Date: Sun, 14 Feb 2021 18:30:36 +0100 Subject: [PATCH] Document TypeScript tsconfig --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 26d0bef..5e06eae 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,21 @@ Adds `cy.historyPush()` and `cy.historyReplace()` commands to the Cypress object to navigate using the React Router Dom history API. Both commands take the `path` and an optional `state` object as parameters. +## With TypeScript + +Typings should be added as follows in tsconfig.json: + +```json +{ + "compilerOptions": { + "lib": ["es5", "dom"], + "target": "es5", + "types": ["cypress", "cypress-react-router"] + }, + "include": ["**/*.ts"] +} +``` + ## Should you use this package? If you are wondering if you should use this package the most likely answer is no.