mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Adding JQuery type as allowed type for event target in Bacon.fromEvent
This commit is contained in:
@@ -28,6 +28,9 @@ function CreatingStreams() {
|
||||
Bacon.fromEvent(process.stdin, "readable", () => {
|
||||
alert("Bacon!");
|
||||
});
|
||||
Bacon.fromEvent($("body"), "click").onValue(() => {
|
||||
alert("Bacon!");
|
||||
});
|
||||
|
||||
// This would create a stream that outputs a single value "Bacon!" and ends after that. The use of setTimeout causes the value to be delayed by 1 second.
|
||||
Bacon.fromCallback(callback => {
|
||||
|
||||
Vendored
+2
-2
@@ -117,7 +117,7 @@ declare module Bacon {
|
||||
* alert("Bacon!");
|
||||
* });
|
||||
*/
|
||||
function fromEvent<E, A>(target:EventTarget|NodeJS.EventEmitter, eventName:string):EventStream<E, A>;
|
||||
function fromEvent<E, A>(target:EventTarget|NodeJS.EventEmitter|JQuery, eventName:string):EventStream<E, A>;
|
||||
|
||||
/**
|
||||
* @callback Bacon.fromEvent~eventTransformer
|
||||
@@ -136,7 +136,7 @@ declare module Bacon {
|
||||
* alert("Bacon!");
|
||||
* });
|
||||
*/
|
||||
function fromEvent<E, A, B>(target:EventTarget|NodeJS.EventEmitter, eventName:string, eventTransformer:(event:A) => B):EventStream<E, B>;
|
||||
function fromEvent<E, A, B>(target:EventTarget|NodeJS.EventEmitter|JQuery, eventName:string, eventTransformer:(event:A) => B):EventStream<E, B>;
|
||||
|
||||
/**
|
||||
* @callback Bacon.fromCallback1~f
|
||||
|
||||
Reference in New Issue
Block a user