hunk.code_window: } from "../internal"
   export type IObservableDecorator = {
       (target: Object, property: string, descriptor?: PropertyDescriptor): void
       enhancer: IEnhancer<any>
   }
   export function createDecoratorForEnhancer(enhancer: IEnhancer<any>): IObservableDecorator {
       invariant(enhancer)
  
hunk.labels: keep keep keep replace keep keep keep keep keep
hunk.after_edit:     (target: Object, property: string | symbol, descriptor?: PropertyDescriptor): void
  
hunk.file_path: src/api/observabledecorator.ts
hunk.type: replace
file: import {
      IArrayChange,
      IArraySplice,
      IComputedValue,
      IMapDidChange,
      IObjectDidChange,
      IObservableArray,
      IObservableValue,
      IValueDidChange,
      Lambda,
      ObservableMap,
      getAdministration
  } from "../internal"
  
  export function observe<T>(
      value: IObservableValue<T> | IComputedValue<T>,
      listener: (change: IValueDidChange<T>) => void,
      fireImmediately?: boolean
  ): Lambda
  export function observe<T>(
      observableArray: IObservableArray<T>,
      listener: (change: IArrayChange<T> | IArraySplice<T>) => void,
      fireImmediately?: boolean
  ): Lambda
  export function observe<K, V>(
      observableMap: ObservableMap<K, V>,
      listener: (change: IMapDidChange<K, V>) => void,
      fireImmediately?: boolean
  ): Lambda
  export function observe<K, V>(
      observableMap: ObservableMap<K, V>,
      property: K,
      listener: (change: IValueDidChange<V>) => void,
      fireImmediately?: boolean
  ): Lambda
  export function observe(
      object: Object,
      listener: (change: IObjectDidChange) => void,
      fireImmediately?: boolean
  ): Lambda
  export function observe<T, K extends keyof T>(
      object: T,
      property: K,
      listener: (change: IValueDidChange<T[K]>) => void,
      fireImmediately?: boolean
  ): Lambda
  export function observe(thing, propOrCb?, cbOrFire?, fireImmediately?): Lambda {
      if (typeof cbOrFire === "function")
          return observeObservableProperty(thing, propOrCb, cbOrFire, fireImmediately)
      else return observeObservable(thing, propOrCb, cbOrFire)
  }
  
  function observeObservable(thing, listener, fireImmediately: boolean) {
      return getAdministration(thing).observe(listener, fireImmediately)
  }
  
  function observeObservableProperty(thing, property, listener, fireImmediately: boolean) {
      return getAdministration(thing, property).observe(listener, fireImmediately)
  }
  