mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-22 20:39:17 +08:00
27 lines
761 B
TypeScript
27 lines
761 B
TypeScript
// Type definitions for knockout.rx 0.1
|
|
// Project: https://github.com/Igorbek/knockout.rx
|
|
// Definitions by: Igor Oleinikov <https://github.com/Igorbek>
|
|
|
|
/// <reference path="../knockout/knockout.d.ts"/>
|
|
/// <reference path="../rx.js/rx.js.d.ts"/>
|
|
|
|
interface KnockoutSubscribableFunctions<T> {
|
|
toObservable(event?: string): Rx.IObservable<T>;
|
|
toObservable<TEvent>(event: string): Rx.IObservable<TEvent>;
|
|
}
|
|
|
|
interface KnockoutObservableFunctions<T> {
|
|
toObservableWithReplyLatest(): Rx.IObservable<T>;
|
|
}
|
|
|
|
interface KnockoutComputedFunctions<T> {
|
|
toObservableWithReplyLatest(): Rx.IObservable<T>;
|
|
}
|
|
|
|
declare module Rx {
|
|
interface IObservable<T> {
|
|
toKoSubscribable(): KnockoutSubscribable<T>;
|
|
toKoObservable(initialValue?: T): KnockoutObservable<T>;
|
|
}
|
|
}
|