import { boundMethod , boundClass } from "autobind-decorator" ; import autoBindClass , { Options } from "auto-bind" ; import autoBindReactClass from "auto-bind/react" ; export function autoBind < T extends object > ( obj , opts ? ) { if ( "componentWillUnmount" in obj ) { return autoBindReactClass ( obj as any , opts ) ; } return autoBindClass ( obj , opts ) ; } export { boundClass , boundMethod , } ;