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

0.6.5 • Public • Published

Installation

npm install --save @types/react-broadcast

Summary

This package contains type definitions for react-broadcast (https://github.com/ReactTraining/react-broadcast).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-broadcast.

index.d.ts

import * as React from "react";

export namespace Subscriber {
    interface DefaultProps {
        quiet: boolean;
    }
    interface Props<T> extends Partial<DefaultProps> {
        channel: string;
        children?: ((state: T) => React.ReactNode) | undefined;
    }
}

export namespace Broadcast {
    interface DefaultProps<T> {
        compareValues: (prevValue: T, nextValue: T) => boolean;
    }
    interface Props<T> extends Partial<DefaultProps<T>> {
        channel: string;
        children: React.ReactNode;
        value: T;
    }
}

export class Broadcast<T> extends React.Component<Broadcast.Props<T>, any> {}
export class Subscriber<T> extends React.Component<Subscriber.Props<T>, any> {}

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: @types/react

Credits

These definitions were written by Jaga Santagostino.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/react-broadcast

Weekly Downloads

533

Version

0.6.5

License

MIT

Unpacked Size

4.1 kB

Total Files

5

Last publish

Collaborators

  • types