Skip to content

Commit

Permalink
Update tests in preparation for TS DefinitelyTyped#31950 (DefinitelyT…
Browse files Browse the repository at this point in the history
  • Loading branch information
ahejlsberg authored Jun 20, 2019
1 parent 598ffd0 commit b051904
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion types/microsoft-ajax/microsoft-ajax-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function BaseClassExtensions_Array_Tests() {
Array.contains(arrayVar, "zero");
Array.dequeue(arrayVar);
Array.enqueue(arrayVar, "zero");
Array.insert([1, 2, 3], 1, {});
Array.insert([1, 2, 3], 1, 123);
Array.isArray({});
Array.parse("1, 2, 3, 4, 5");
Array.remove([1, 2, 3], 2);
Expand Down
2 changes: 1 addition & 1 deletion types/mongoose/v3/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,8 @@ declare module "mongoose" {
mapReduce<K, V>(options: MapReduceOption2<T, K, V>, callback?: (err: any, res: MapReduceResult<K, V>[]) => void): Promise<MapReduceResult<K, V>[]>;
model<U extends Document>(name: string): Model<U>;

populate<U>(doc: U, options: Object, callback?: (err: any, res: U) => void): Promise<U>;
populate<U>(doc: U[], options: Object, callback?: (err: any, res: U[]) => void): Promise<U[]>;
populate<U>(doc: U, options: Object, callback?: (err: any, res: U) => void): Promise<U>;
update(cond: Object, update: Object, callback?: (err: any, affectedRows: number, raw: any) => void): Query<T>;
update(cond: Object, update: Object, options: Object, callback?: (err: any, affectedRows: number, raw: any) => void): Query<T>;
remove(cond: Object, callback?: (err: any) => void): Query<{}>;
Expand Down
4 changes: 2 additions & 2 deletions types/mongoose/v3/mongoose-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,11 @@ Model.find({ type: 'iphone' }, (err: any, res: IActor[]) => {
var promise = Model.populate(res, opts);
promise.then(console.log).end();
});
Model.populate({ name: 'Test A' }, { path: 'weapon', model: 'Weapon' }, (err: any, user: IActor) => {});
Model.populate({ name: 'Test A' }, { path: 'weapon', model: 'Weapon' }, (err: any, user: { name: string }) => {});
Model.populate([
{ name: 'User hoge' },
{ name: 'User fuga' },
], { path: 'weapon' }, (err: any, users: IActor[]) => {});
], { path: 'weapon' }, (err: any, users: { name: string }[]) => {});

Model.remove({ title: 'baby born from alien father' }, (err: any) => {});
var query2 = Model.remove({ _id: 'id' });
Expand Down

0 comments on commit b051904

Please sign in to comment.