Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface WrapSettings

Settings of wrap function.

Hierarchy

  • WrapSettings

Indexable

[field: string]: any

Settings of wrap function.

Index

Properties

Optional after

after: undefined | false | true

Whether original function, method or field's operation should be called after handler. When this option is set to true, the result of original function/method or field's operation will be returned from wrapping function.

Optional before

before: undefined | false | true

Whether original function, method or field's operation should be called before handler. When this option is set to true, the result of original function/method or field's operation will be available in handler and value returned from handler will be returned from wrapping function if settings.after and settings.listen are set to false.

Optional bind

bind: undefined | false | true

Whether wrapping function should be bound to target object.

Optional context

context: undefined | object

Context (this) that should be used for handler call.

Optional data

data: any

Any data that should be available in handler.

Optional get

get: boolean | FieldGetter

Whether field's get operation should be intercepted and whether created wrapping function should be used as field's getter. If a function is provided the function will be used as value for HandlerParam.get when no getter is specified for the field. Default value is true for usual (non-functional) field and false for method.

Optional listen

listen: undefined | false | true

Whether original function, method or field's operation should be called before handler. When this option is set to true, the result of original function/method or field's operation will be available in handler and will be returned from wrapping function if settings.after is set to false.

Optional set

set: boolean | FieldSetter

Whether field's set operation should be intercepted and whether created wrapping function should be used as field's setter. If a function is provided the function will be used as value for HandlerParam.set when no getter is specified for the field. Default value is true for usual (non-functional) field and false for method.

Generated using TypeDoc