mirror of
https://github.com/chenasraf/DefinitelyTyped.git
synced 2026-05-18 01:49:01 +00:00
17 lines
349 B
TypeScript
17 lines
349 B
TypeScript
import bindArgs = require('bind-args');
|
|
|
|
// $ExpectType number
|
|
bindArgs(() => 3)();
|
|
|
|
// @ts-expect-error
|
|
bindArgs(() => 3, 'arg')();
|
|
|
|
// $ExpectType boolean
|
|
bindArgs((a: string, b: number) => false, '')(2);
|
|
|
|
// @ts-expect-error
|
|
bindArgs((a: string, b: number) => false, true);
|
|
|
|
// @ts-expect-error
|
|
bindArgs((a: string, b: number) => false, '')({});
|