Commit Graph
17 Commits
Author SHA1 Message Date
Andrew Bradley 48004042dd Fix linter failures in mocha types 2018-03-15 01:29:00 -04:00
Andrew Bradley bbe066cb55 Update Mocha declarations to v5
Use string union for Mocha interface name
Allow module augmentation to contribute new interface names
Allow `mocha.setup(interfaceName)`
Ambient variables are declared `const`, not `var`
`done` callbacks return `void` not `any`
factory functions (after, describe, it, etc) can return Promises, but not anything else.
- Promise support is explained here: https://mochajs.org/#require
- Allowing callbacks to return `any` could cause confusion.  Returning anything other than a Promise is probably a mistake
- I was unable to forbid accepting a `done` callback while simultaneously returning a Promise, even though doing so triggers a runtime error
`keyof` requires at least TypeScript 2.1
2018-03-14 22:56:29 -04:00
Andrew Bradley 0bd1584c8f Remove redundant ambient declaration of mocha globals via ember-mocha
the mocha declarations do this themselves; duplicates are causing type errors
2018-03-14 22:53:47 -04:00
Andrew Bradley 9ea8da2d0e Remove or fix dependencies on mocha by other declarations
If dependency is unnecessary, replaces with stub declarations
If dependency is necessary, declares a requirement on at least TS2.1 to match mocha's
2018-03-14 22:52:57 -04:00
Andrew Bradley 393e432027 Adds declarations for 'charset' package (#22764) 2018-01-08 14:17:03 -08:00
Andrew Bradley d7590b6d0a cmd-shim: adds new declarations (#22735)
* Fixes typo in my username

* Adds declarations for cmd-shim
2018-01-08 10:21:14 -08:00
Andrew Bradley 2b17e92e96 Fixes typo in my username (#22592) 2018-01-03 00:46:35 -08:00
Andrew Bradley eba05bf2ac Updates declarations for "which"
- Enables strictNullChecks
- Adds options: `nothrow`, `all`, `path`, and `pathExt`
- Uses function overloading to pick most specific return types based on `all` and `nothrow` options
2017-12-21 15:43:11 -05:00
Andrew Bradley 8cf308d12d Enable LF normalization
CRLF on Windows checkout; LF on Mac & Linux checkout; always LF in the repository
2016-01-29 13:37:41 -05:00
Andrew Bradley f505d870ff Remove dependence on jquery.d.ts
jQuery declares a global var `$` which makes it potentially conflict with other declarations, for example angular-protractor

autobahn.d.ts doesn't need to depend on jquery.d.ts since the only thing it used, JqueryPromise, can be replaced with when.Promise
2016-01-11 23:16:59 -05:00
Andrew Bradley ddc41566fd Fixes bug in grunt definitions
Removes `pkg` property from `IProjectConfig` interface (the config object passed to `grunt.initConfig`) because it is not necessary; it is merely a commonly-used convention.
2014-12-10 15:25:58 -05:00
Andrew Bradley 1d556e1d7c Modified Mousetrap definition to allow Mousetrap to be loaded as an
external module.

- tests are also updated to test loading as an external module
- mousetrap exports itself as an AMD module when an AMD define function is
  present
2014-11-06 01:39:49 -05:00
Andrew Bradley a0e56c27e7 Adds definitions and tests for the Mousetrap global-bind extension 2014-11-06 01:17:54 -05:00
Andrew Bradley 035fea44c6 Updates sinon-chai definition and tests to support loading sinon-chai as a
chai plugin.

- usage is as follows:
    import sinonChai = require('sinon-chai');
    chai.use(sinonChai);
- Also updates the tests to compile with --noImplicitAny
2014-09-29 06:15:01 -04:00
Andrew Bradley 80dea1ec41 Eliminate implicit any in "xpath" tests. 2014-08-31 01:03:59 -04:00
Andrew Bradley 495675e550 Add "xpath" definition to CONTRIBUTORS list 2014-08-31 00:54:15 -04:00
Andrew Bradley 60715c8fb7 Add definition and tests for "xpath" npm module. 2014-08-31 00:54:09 -04:00