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

Need to add global.d.ts? #125

Closed
bttf opened this issue Nov 23, 2017 · 6 comments
Closed

Need to add global.d.ts? #125

bttf opened this issue Nov 23, 2017 · 6 comments

Comments

@bttf
Copy link

bttf commented Nov 23, 2017

There will be compilation errors for all test files with use of global variables declare, it, xit, etc...

Should we add a global.d.ts (described here) that specifies these globals, and add them to each of the exercises?

@masters3d
Copy link
Contributor

I am not sure I follow.

@masters3d
Copy link
Contributor

declare, it and xit are part Jest. Am I missing something? I am not a js/ts expert.

@bttf
Copy link
Author

bttf commented Nov 26, 2017

anyone using a text editor that uses TypeScript's language services (tsserver) will see errors when they open the test files.

this is because declare, it, and xit are not declared anywhere in the global namespace

@masters3d
Copy link
Contributor

I use vs code which auto imports jest.
Other code editors also have auto import plug ins.

This is also coming to TS server I think.
microsoft/TypeScript#19069

@masters3d
Copy link
Contributor

Is that what you were thinking?

@ghost
Copy link

ghost commented Dec 1, 2017

This is not a code editor issue nor is it related to the Typescript language server.

@bttf, In order to resolve your issues you need to run npm install or yarn install in the relevant directory. This will install @types/jest and remedy the issue..

@bttf bttf closed this as completed Dec 1, 2017
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

No branches or pull requests

2 participants