{"action":"created","issue":{"url":"https://api.github.com/repos/cypress-io/cypress/issues/1152","repository_url":"https://api.github.com/repos/cypress-io/cypress","labels_url":"https://api.github.com/repos/cypress-io/cypress/issues/1152/labels{/name}","comments_url":"https://api.github.com/repos/cypress-io/cypress/issues/1152/comments","events_url":"https://api.github.com/repos/cypress-io/cypress/issues/1152/events","html_url":"https://github.com/cypress-io/cypress/issues/1152","id":286276323,"number":1152,"title":"Cannot pick up typings for Cypress with the Typescript recipe","user":{"login":"NoNameProvided","id":4706265,"avatar_url":"https://avatars3.githubusercontent.com/u/4706265?v=4","gravatar_id":"","url":"https://api.github.com/users/NoNameProvided","html_url":"https://github.com/NoNameProvided","followers_url":"https://api.github.com/users/NoNameProvided/followers","following_url":"https://api.github.com/users/NoNameProvided/following{/other_user}","gists_url":"https://api.github.com/users/NoNameProvided/gists{/gist_id}","starred_url":"https://api.github.com/users/NoNameProvided/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NoNameProvided/subscriptions","organizations_url":"https://api.github.com/users/NoNameProvided/orgs","repos_url":"https://api.github.com/users/NoNameProvided/repos","events_url":"https://api.github.com/users/NoNameProvided/events{/privacy}","received_events_url":"https://api.github.com/users/NoNameProvided/received_events","type":"User","site_admin":false},"labels":[{"id":772766544,"url":"https://api.github.com/repos/cypress-io/cypress/labels/topic:%20typescript","name":"topic: typescript","color":"269bad","default":false},{"id":182981371,"url":"https://api.github.com/repos/cypress-io/cypress/labels/type:%20question","name":"type: question","color":"cc317c","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2018-01-05T12:30:12Z","updated_at":"2018-03-21T05:26:38Z","closed_at":null,"author_association":"NONE","body":"<!-- Want a bug fixed quickly? Please provide a repository to reproduce the issue. -->\r\n\r\n- Operating System: MacOS High Sierra 10.13.2 \r\n- Cypress Version: 1.4.1 (both package and binary)\r\n- Browser Version: 63.0.3239.132 (Official Build) (64-bit)\r\n\r\n### Is this a Feature or Bug?\r\n\r\nBug.\r\n\r\n### Current behavior:\r\n\r\nCypress ships with bundled typings but the compiler cannot pick up the typings for Cypress and fails on encountering  a`cy` call.\r\n\r\n### Desired behavior:\r\n\r\nTypescript compiler can pick up the typings and test files compile successfully.\r\n\r\n### How to reproduce:\r\n\r\n1. Setup a vanilla cypress setup\r\n2. Use the provided [typescript recipe](https://github.com/cypress-io/cypress-example-recipes/tree/master/examples/preprocessors__typescript-webpack) \r\n3. Write an example spec file like:\r\n    ```ts\r\n    describe('Example', function () {\r\n      it('Example task', function () {\r\n        cy.visit('http://example.com');\r\n    });\r\n    ```\r\n4. Observe the compiler failing on `cy`\r\n\r\n#### Test code:\r\n\r\nSee above\r\n\r\n### Additional Info (images, stack traces, etc)\r\n\r\n```\r\n./cypress/integration/REDACTED.spec.ts\r\n[tsl] ERROR in REDACTED(3, 5)\r\n      TS2304: Cannot find name 'cy'.\r\n```\r\n\r\n  "},"comment":{"url":"https://api.github.com/repos/cypress-io/cypress/issues/comments/374837002","html_url":"https://github.com/cypress-io/cypress/issues/1152#issuecomment-374837002","issue_url":"https://api.github.com/repos/cypress-io/cypress/issues/1152","id":374837002,"user":{"login":"NicholasBoll","id":338257,"avatar_url":"https://avatars2.githubusercontent.com/u/338257?v=4","gravatar_id":"","url":"https://api.github.com/users/NicholasBoll","html_url":"https://github.com/NicholasBoll","followers_url":"https://api.github.com/users/NicholasBoll/followers","following_url":"https://api.github.com/users/NicholasBoll/following{/other_user}","gists_url":"https://api.github.com/users/NicholasBoll/gists{/gist_id}","starred_url":"https://api.github.com/users/NicholasBoll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NicholasBoll/subscriptions","organizations_url":"https://api.github.com/users/NicholasBoll/orgs","repos_url":"https://api.github.com/users/NicholasBoll/repos","events_url":"https://api.github.com/users/NicholasBoll/events{/privacy}","received_events_url":"https://api.github.com/users/NicholasBoll/received_events","type":"User","site_admin":false},"created_at":"2018-03-21T05:26:38Z","updated_at":"2018-03-21T05:26:38Z","author_association":"CONTRIBUTOR","body":"Try adding `\"types\": [\"cypress\"]` to the tsconfig.json file under the Cypress directory. That worked for me. That should do the same thing as the reference directive @bahmutov suggested, but for all TS files."}}
{"actor":{"display_login":"NicholasBoll"}}