@types/knockout-postbox
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

Installation

npm install --save @types/knockout-postbox

Summary

This package contains type definitions for knockout-postbox (https://github.com/rniemeyer/knockout-postbox).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/knockout-postbox.

index.d.ts

/// <reference types="knockout" />

interface KnockoutPostBox {
    subscribe<T>(topic: string, handler: (value: T) => void, target?: any): KnockoutSubscription;
    publish<T>(topic: string, value?: T): void;
    defaultComparer<T>(newValue: T, oldValue: T): boolean;
    serializer: (object: any) => string;
    reset(): void;
}

interface KnockoutObservable<T> {
    subscribeTo(
        topic: string,
        useLastPublishedValueToInitialize?: boolean,
        transform?: (val: any) => T,
    ): KnockoutObservable<T>;
    unsubscribeFrom(topic: string): KnockoutObservable<T>;
    publishOn(
        topic: string,
        skipInitialPublish?: boolean,
        equalityComparer?: (newValue: T, oldValue: T) => boolean,
    ): KnockoutObservable<T>;
    stopPublishingOn(topic: string): KnockoutObservable<T>;
    syncWith(
        topic: string,
        initializeWithLatestValue?: boolean,
        skipInitialPublish?: boolean,
        equalityComparer?: (newValue: T, oldValue: T) => boolean,
    ): KnockoutObservable<T>;
}

interface KnockoutObservableArray<T> {
    subscribeTo(
        topic: string,
        useLastPublishedValueToInitialize?: boolean,
        transform?: (val: any) => any, /* T */
    ): KnockoutObservableArray<T>;
    unsubscribeFrom(topic: string): KnockoutObservableArray<T>;
    publishOn(
        topic: string,
        skipInitialPublish?: boolean,
        equalityComparer?: (newValue: any, /* T */ oldValue: any /* T */) => boolean,
    ): KnockoutObservableArray<T>;
    stopPublishingOn(topic: string): KnockoutObservableArray<T>;
    syncWith(
        topic: string,
        initializeWithLatestValue?: boolean,
        skipInitialPublish?: boolean,
        equalityComparer?: (newValue: any, /* T */ oldValue: any /* T */) => boolean,
    ): KnockoutObservableArray<T>;
}

interface KnockoutStatic {
    postbox: KnockoutPostBox;
}

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:38 GMT
  • Dependencies: @types/knockout

Credits

These definitions were written by Judah Gabriel Himango.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/knockout-postbox

Weekly Downloads

378

Version

0.0.5

License

MIT

Unpacked Size

6.45 kB

Total Files

5

Last publish

Collaborators

  • types