mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
11 lines
299 B
TypeScript
11 lines
299 B
TypeScript
/// <reference path="./array-find-index.d.ts" />
|
|
|
|
import * as arrayFindIndex from '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);
|