mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
fix travis errors
This commit is contained in:
@@ -256,9 +256,9 @@ describe('update', function () {
|
||||
}
|
||||
});
|
||||
|
||||
assert.strictEqual(updated[0], instance[0]);
|
||||
assert.notStrictEqual(updated[1], instance[1]);
|
||||
assert.strictEqual(updated[1].c, instance[1].c);
|
||||
assert.strictEqual((<any> updated)[0], (<any> instance)[0]);
|
||||
assert.notStrictEqual((<any> updated)[1], (<any> instance)[1]);
|
||||
assert.strictEqual((<any> updated)[1].c, (<any> instance)[1].c);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1328,8 +1328,8 @@ describe('tuple', function () {
|
||||
|
||||
it('should coerce values', function () {
|
||||
var t = T([{}, {}]);
|
||||
ok(S.is(t[0]));
|
||||
ok(S.is(t[1]));
|
||||
ok(S.is((<any> t)[0]));
|
||||
ok(S.is((<any> t)[1]));
|
||||
});
|
||||
|
||||
it('should accept only valid values', function () {
|
||||
@@ -1381,8 +1381,8 @@ describe('tuple', function () {
|
||||
it('should return a new instance', function () {
|
||||
var newInstance = Type.update(instance, {0: {$set: 'b'}});
|
||||
assert(Type.is(newInstance));
|
||||
assert(instance[0] === 'a');
|
||||
assert(newInstance[0] === 'b');
|
||||
assert((<any> instance)[0] === 'a');
|
||||
assert((<any> newInstance)[0] === 'b');
|
||||
});
|
||||
|
||||
});
|
||||
@@ -1418,7 +1418,7 @@ describe('list', function () {
|
||||
|
||||
it('should coerce values', function () {
|
||||
var t = T([{}]);
|
||||
ok(S.is(t[0]));
|
||||
ok(S.is((<any> t)[0]));
|
||||
});
|
||||
|
||||
it('should accept only valid values', function () {
|
||||
|
||||
9
tcomb/tcomb.d.ts
vendored
9
tcomb/tcomb.d.ts
vendored
@@ -1,10 +1,13 @@
|
||||
// Type definitions for tcomb v1.0.3
|
||||
// Project: http://gcanti.github.io/tcomb/guide/index.html
|
||||
// Definitions by: Jed Mao <https://github.com/jedmao> and Hans Windhoff <https://github.com/hansrwindhoff>
|
||||
// Definitions by: Jed Mao <https://github.com/jedmao>
|
||||
// and Hans Windhoff <https://github.com/hansrwindhoff>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module TComb {
|
||||
|
||||
export interface NumbersOnly {
|
||||
[idx:number]:string;
|
||||
}
|
||||
export interface tcomb {
|
||||
format: (format: string, ...values: any[]) => string;
|
||||
getFunctionName: (fn: Function) => string;
|
||||
@@ -12,7 +15,7 @@ declare module TComb {
|
||||
mixin: (target: {}, source: {}, overwrite?: boolean) => any;
|
||||
slice: typeof Array.prototype.slice;
|
||||
shallowCopy: (x: TCombBase) => TCombBase;
|
||||
update: (instance: any, spec: {}) => TCombBase;
|
||||
update: (instance: any, spec: {} ) => TCombBase;
|
||||
assert: (condition: boolean, message?: string, ...values: any[]) => void;
|
||||
fail: (message?: string) => void;
|
||||
Any: Any_Static;
|
||||
|
||||
Reference in New Issue
Block a user