mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 15:27:05 +00:00
Overloading add/removeObserver and add/removeListener
This commit is contained in:
Vendored
+31
-2
@@ -1683,7 +1683,11 @@ declare module 'ember' {
|
||||
addObserver<Target>(
|
||||
key: keyof this,
|
||||
target: Target,
|
||||
method?: ObserverMethod<Target, this>
|
||||
method: ObserverMethod<Target, this>
|
||||
): void;
|
||||
addObserver<Target>(
|
||||
key: keyof this,
|
||||
method: ObserverMethod<Target, this>
|
||||
): void;
|
||||
/**
|
||||
* Remove an observer you have previously registered on this object. Pass
|
||||
@@ -1693,7 +1697,11 @@ declare module 'ember' {
|
||||
removeObserver<Target>(
|
||||
key: keyof this,
|
||||
target: Target,
|
||||
method?: ObserverMethod<Target, this>
|
||||
method: ObserverMethod<Target, this>
|
||||
): any;
|
||||
removeObserver<Target>(
|
||||
key: keyof this,
|
||||
method: ObserverMethod<Target, this>
|
||||
): any;
|
||||
/**
|
||||
* Retrieves the value of a property, or a default value in the case that the
|
||||
@@ -3010,6 +3018,12 @@ declare module 'ember' {
|
||||
method: ObserverMethod<Target, Context>,
|
||||
once?: boolean
|
||||
): void;
|
||||
function addListener<Context, Target>(
|
||||
obj: Context,
|
||||
key: keyof Context,
|
||||
method: ObserverMethod<Target, Context>,
|
||||
once?: boolean
|
||||
): void;
|
||||
/**
|
||||
* Remove an event listener
|
||||
*/
|
||||
@@ -3019,6 +3033,11 @@ declare module 'ember' {
|
||||
target: Target,
|
||||
method: ObserverMethod<Target, Context>
|
||||
): any;
|
||||
function removeListener<Context, Target>(
|
||||
obj: Context,
|
||||
key: keyof Context,
|
||||
method: ObserverMethod<Target, Context>
|
||||
): any;
|
||||
/**
|
||||
* Send an event. The execution of suspended listeners
|
||||
* is skipped, and once listeners are removed. A listener without
|
||||
@@ -3112,6 +3131,11 @@ declare module 'ember' {
|
||||
target: Target,
|
||||
method: ObserverMethod<Target, Context>
|
||||
): void;
|
||||
function addObserver<Context, Target>(
|
||||
obj: Context,
|
||||
key: keyof Context,
|
||||
method: ObserverMethod<Target, Context>
|
||||
): void;
|
||||
/**
|
||||
* Remove an observer you have previously registered on this object. Pass
|
||||
* the same key, target, and method you passed to `addObserver()` and your
|
||||
@@ -3123,6 +3147,11 @@ declare module 'ember' {
|
||||
target: Target,
|
||||
method: ObserverMethod<Target, Context>
|
||||
): any;
|
||||
function removeObserver<Context, Target>(
|
||||
obj: Context,
|
||||
key: keyof Context,
|
||||
method: ObserverMethod<Target, Context>
|
||||
): any;
|
||||
/**
|
||||
* Gets the value of a property on an object. If the property is computed,
|
||||
* the function will be invoked. If the property is not defined but the
|
||||
|
||||
Reference in New Issue
Block a user