bardjs icon indicating copy to clipboard operation
bardjs copied to clipboard

Compile errors with Bard + Typescript + Jasmine

Open jsmarsch opened this issue 8 years ago • 3 comments

I'll warn you first that I'm a little new to typescript, so I might just have something wrong.

I'm using Definitely Typed typings with Bardjs, and I'm using Jasmine as my unit test framework. When I tried to compile my typescript, I was getting errors because Bardjs.d.ts references Mocha and Chai typings.

So, I tried just pulling the mocha and chai typings into the project, but once I did that, the definitions of it, expect, etc all clashed with jasmine so I got multiple errors about expect being defined twice.

Is this something I've done wrong (seems weird that all of those types are globally scoped), or is this a bug?

jsmarsch avatar Aug 10 '16 21:08 jsmarsch

I got the same problem jsut now. I am using Jasmine along with Typescript.

When I Typescript compile my tests, bard/index.d.ts references mocha/index.d.ts, and somehow jasmine/index.d.ts is also brought in. mocha.d.ts and jasmine.d.ts conflict with each other and causes this error ...\node_modules@types\jasmine\index.d.ts(9,18): error TS2300: Build:Duplicate identifier 'describe'.

bronielsen avatar Dec 09 '16 15:12 bronielsen

I'm also struggling with the same problem. As soon as I add bardjs, the compiler brings in the other types it imports. If I don't bring in bardjs, then I get compile errors in my Jasmine spec files that it can't find bard.

jmichaud-ips avatar Feb 08 '17 15:02 jmichaud-ips

I'm seeing the same thing. Any updates on possible solutions?

alaney avatar Apr 24 '17 20:04 alaney