mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-21 21:31:12 +08:00
extends should.d.ts to support global 'Should' and 'window.Should' variable for in-browser mode (See https://github.com/visionmedia/should.js/#in-browser)
This commit is contained in:
@@ -39,6 +39,9 @@ should.not.exist(false);
|
||||
should.not.exist('');
|
||||
should.not.exist({});
|
||||
|
||||
Should.exist(null);
|
||||
window.Should.exist(null);
|
||||
|
||||
user.should.have.property('pets').with.lengthOf(4);
|
||||
user.pets.should.have.lengthOf(4);
|
||||
user.should.be.of.type('object').and.have.property('name', 'tj');
|
||||
|
||||
4
should/should.d.ts
vendored
4
should/should.d.ts
vendored
@@ -112,6 +112,10 @@ interface Internal extends ShouldInternal {
|
||||
}
|
||||
|
||||
declare var should: Internal;
|
||||
declare var Should: Internal;
|
||||
interface Window {
|
||||
Should: Internal;
|
||||
}
|
||||
|
||||
declare module "should" {
|
||||
export = should;
|
||||
|
||||
Reference in New Issue
Block a user