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

Type definitions for devdependencies #417

Closed
DamonOehlman opened this issue Sep 7, 2020 · 3 comments
Closed

Type definitions for devdependencies #417

DamonOehlman opened this issue Sep 7, 2020 · 3 comments
Assignees

Comments

@DamonOehlman
Copy link

DamonOehlman commented Sep 7, 2020

Hey folks,

Just wondering if the various @types/* packages that have been included for working with various dev dependencies can be moved to devdependencies also, e.g. those related to mocha, chai, prettier, etc.

The @types/mocha is a particular pain point because if another package brings in a dependency on @types/jasmine then errors like the following arise during typescript transpilation:

../../node_modules/@types/jasmine/ts3.1/index.d.ts(29,18): error TS2300: Duplicate identifier 'describe'.
../../node_modules/@types/jasmine/ts3.1/index.d.ts(43,18): error TS2300: Duplicate identifier 'xdescribe'.
../../node_modules/@types/jasmine/ts3.1/index.d.ts(52,18): error TS2300: Duplicate identifier 'it'.
../../node_modules/@types/jasmine/ts3.1/index.d.ts(68,18): error TS2300: Duplicate identifier 'xit'.
../../node_modules/@types/jasmine/ts3.1/index.d.ts(82,18): error TS2300: Duplicate identifier 'beforeEach'.
../../node_modules/@types/jasmine/ts3.1/index.d.ts(89,18): error TS2300: Duplicate identifier 'afterEach'.
../../node_modules/@types/mocha/index.d.ts(2680,13): error TS2300: Duplicate identifier 'beforeEach'.
../../node_modules/@types/mocha/index.d.ts(2698,13): error TS2300: Duplicate identifier 'afterEach'.
../../node_modules/@types/mocha/index.d.ts(2714,13): error TS2300: Duplicate identifier 'describe'.
../../node_modules/@types/mocha/index.d.ts(2735,13): error TS2300: Duplicate identifier 'xdescribe'.
../../node_modules/@types/mocha/index.d.ts(2749,13): error TS2300: Duplicate identifier 'it'.
../../node_modules/@types/mocha/index.d.ts(2770,13): error TS2300: Duplicate identifier 'xit'.

gz#5805

@shodgetts
Copy link

Agent comment from Seetha in Zendesk ticket #5805:

Hi Damon

Thanks for reaching out to us.
Are you using jasmine and mocha at the same time? This duplicate identifier issue is mainly because of jasmine and mocha declaring the same global variables.
I will check with our Engineering team and let you know.

Cheers
Seetha

@DamonOehlman
Copy link
Author

Yes, @types/jasmine is something we require as a a dev dependency ourselves for one of our other packages in our monorepo style project, which is why the conflict arises. I can say with 99% certainty that all your testing related type definition packages (as mentioned - mocha, chai, etc) can be moved to devDependencies rather than dependencies which will allow consumers of the stream-chat package to safely use @types/jasmine if they so choose without having the conflict occur.

@shodgetts
Copy link

Agent comment from Seetha in Zendesk ticket #5805:

Hi Damon

Thanks for the update.
I am checking with our Engineering team. We will provide an update once we hear from them. The engineering team works during EU hours.

Thanks for your patience.

Cheers
Seetha

@mahboubii mahboubii self-assigned this Sep 7, 2020
mahboubii pushed a commit that referenced this issue Sep 7, 2020
Fix #417/ move types to devDependencies
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

3 participants