mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-01 09:01:45 +08:00
angular.forEach obj parameter in callback function (#14953)
This commit is contained in:
@@ -587,7 +587,8 @@ namespace TestPromise {
|
||||
function test_angular_forEach() {
|
||||
const values: { [key: string]: string } = { name: 'misko', gender: 'male' };
|
||||
const log: string[] = [];
|
||||
angular.forEach(values, (value, key) => {
|
||||
angular.forEach(values, (value, key, obj) => {
|
||||
obj[key] = value;
|
||||
this.push(key + ': ' + value);
|
||||
}, log);
|
||||
// expect(log).toEqual(['name: misko', 'gender: male']);
|
||||
|
||||
Reference in New Issue
Block a user