JQuery Typescript definitions using 'bool' instead of 'Boolean'

Vaccano picture Vaccano · Dec 3, 2015 · Viewed 7.6k times · Source

I got the "Definitely Typed" typescript definition file for JQuery and it uses bool instead of 'Boolean'.

This is giving me errors in my typescript project: Cannot find name 'bool'

I changed my version to use Boolean and it works, but it has me confused.

Is Definitely Typed still the place to get typescript definitions? If so, why is it not breaking for everyone else?

Is there a better place to get typescript definitions?

Answer

Ryan Cavanaugh picture Ryan Cavanaugh · Dec 3, 2015

The correct name to use is boolean, not Boolean.

Definitely Typed is still the correct place to get definitions from.

Where did you get this file? The current version (https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/jquery/jquery.d.ts) does not use bool anywhere.