Importing Chai in Typescript

0 votes

I'm trying to use chai in typescript.

Chai's javascript example shows this as:

var should = require('chai').should();

I downloaded the type definition:

tsd install chai

...referenced the file, tried to import

/// <reference path='../typings/chai/chai.d.ts' />
import should = require('chai').should();

I get:

error TS1005: ';' expected

...any idea how to do this?

Aug 1, 2022 in TypeSript by Elton
• 400 points

edited Mar 4 6 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP