npm.io
2.0.37 • Published 2 years ago

@types/react-mixin

Licence
MIT
Version
2.0.37
Deps
2
Size
4 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/react-mixin

Summary

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

Details

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

index.d.ts

/// <reference types="react" />

import { Mixin } from "create-react-class";
import * as React from "react";

declare namespace reactMixin {
    export interface ClassDecorator {
        // eslint-disable-next-line @typescript-eslint/no-invalid-void-type
        <TFunction extends Function>(target: TFunction): TFunction | void;
    }

    interface ReactMixin {
        decorate(mixin: Mixin<any, any>): ClassDecorator;
        onClass<S>(clazz: any, mixin: Mixin<any, any>): React.ComponentClass<S>;
        <S>(clazz: any, mixin: Mixin<any, any>): React.ComponentClass<S>;
    }
}

declare var reactMixin: reactMixin.ReactMixin;

export = reactMixin;

Additional Details

Credits

These definitions were written by Qubo.