mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* auto-bind definitions * auto-bind: fix lint errors * auto-bind: PR feedback, fix import syntax in tests
26 lines
725 B
TypeScript
26 lines
725 B
TypeScript
// Type definitions for auto-bind 1.2
|
|
// Project: https://github.com/sindresorhus/auto-bind#readme
|
|
// Definitions by: Sindre Seppola <https://github.com/sseppola>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
// TypeScript Version: 2.3
|
|
|
|
declare namespace autoBind {
|
|
interface AutoBindOptions {
|
|
include?: Array<string | RegExp>;
|
|
exclude?: Array<string | RegExp>;
|
|
}
|
|
|
|
type AutoBindFunction<selfT = object> = (
|
|
self: selfT,
|
|
options?: AutoBindOptions
|
|
) => selfT;
|
|
}
|
|
|
|
interface AutoBindModule<selfT = object>
|
|
extends autoBind.AutoBindFunction<selfT> {
|
|
react: autoBind.AutoBindFunction<selfT>;
|
|
}
|
|
|
|
declare const autoBind: AutoBindModule;
|
|
export = autoBind;
|