0.4.1 • Published 11 months ago
extra-proxy v0.4.1
extra-proxy
Install
npm install --save extra-proxy
# or
yarn add extra-proxy
API
bind
function bind<T extends object>(obj: T, thisArg: object = obj): T
Returns a Proxy
object whose first-level method's this
is always bound to thisArg
.
applyPropertyDecorators
function applyPropertyDecorators<
Obj extends object
, Keys extends keyof Obj
, OldValue
, NewValue
>(
obj: Obj
, propertyKeys: Keys[]
, propertyDecorator: (value: OldValue) => NewValue
): MapPropsByKey<Obj, Keys, NewValue>