mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-01-29 21:17:34 +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);
|