mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
9 lines
249 B
TypeScript
9 lines
249 B
TypeScript
import arrayFindIndex = require("array-find-index");
|
|
|
|
arrayFindIndex(['rainbow', 'unicorn', 'pony'], x => x === 'unicorn');
|
|
|
|
const ctx = {foo: 'rainbow'};
|
|
arrayFindIndex(['rainbow', 'unicorn', 'pony'], function(x) {
|
|
return x === this.foo;
|
|
}, ctx);
|