mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-04 19:42:46 +08:00
Update should.js types for version 11
This commit is contained in:
6
types/should/index.d.ts
vendored
6
types/should/index.d.ts
vendored
@@ -1,6 +1,6 @@
|
||||
// Type definitions for should.js v8.3.0
|
||||
// Type definitions for should.js v11.2.0
|
||||
// Project: https://github.com/shouldjs/should.js
|
||||
// Definitions by: Alex Varju <https://github.com/varju/>, Maxime LUCE <https://github.com/SomaticIT/>
|
||||
// Definitions by: Alex Varju <https://github.com/varju/>, Maxime LUCE <https://github.com/SomaticIT/>, Lukas Spieß <https://github.com/lumaxis/>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
interface Object {
|
||||
@@ -88,6 +88,8 @@ interface ShouldAssertion {
|
||||
keys(...allKeys: string[]): ShouldAssertion;
|
||||
keys(allKeys: string[]): ShouldAssertion;
|
||||
enumerable(property: string, value?: any): ShouldAssertion;
|
||||
size(size: number): ShouldAssertion;
|
||||
value(key: string | number, value: any): ShouldAssertion;
|
||||
enumerables(...properties: string[]): ShouldAssertion;
|
||||
startWith(expected: string, message?: any): ShouldAssertion;
|
||||
endWith(expected: string, message?: any): ShouldAssertion;
|
||||
|
||||
@@ -264,6 +264,11 @@ obj.should.have.keys('foo', 'bar');
|
||||
obj.should.have.keys(['foo', 'bar']);
|
||||
obj.should.have.key('foo');
|
||||
|
||||
({ a: 10 }).should.have.size(1);
|
||||
|
||||
({ a: 10 }).should.have.value('a', 10);
|
||||
({ a: 10 }).should.have.value(1, 2);
|
||||
|
||||
({ a: 10 }).should.have.enumerable('a');
|
||||
({ a: 10 }).should.have.enumerable('a', 10);
|
||||
({ a: 10, b: 10 }).should.have.enumerables('a', 'b');
|
||||
|
||||
Reference in New Issue
Block a user