New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@types/react-resolver

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/react-resolver

TypeScript definitions for react-resolver

ts4.6
ts4.7
ts4.8
ts4.9
ts5.0
ts5.1
ts5.2
ts5.3
ts5.4
ts5.5
ts5.6
ts5.7
ts5.8
ts5.9
ts6.0
latest
Source
npmnpm
Version
3.1.7
Version published
Weekly downloads
43
-23.21%
Maintainers
1
Weekly downloads
 
Created
Source

Installation

npm install --save @types/react-resolver

Summary

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

Details

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

index.d.ts

import { ComponentType, Factory, FunctionComponent } from "react";

export interface Resolver {
    resolve<P>(
        factory: Factory<P>,
    ): Promise<{
        data: any;
        Resolved: FunctionComponent<P>;
    }>;

    render(factory: Factory<any>, root: Node | null): void;
}

export const Resolver: Resolver;

export type ResolveFn<Props, V> = (props: Props) => Promise<V>;

/** Use this for gaining access to a context as a prop without the boilerplate of setting `contextTypes`. */
export function context<K extends string>(
    prop: K,
): <OwnProps>(
    component: ComponentType<OwnProps>,
) => FunctionComponent<OwnProps & Record<K, any>>;

/**
 * Use `@client(LoaderComponent)` (or `client(LoaderComponent)(YourComponent)`)
 * for when you want to skip server-side rendering of part of your view and
 * perform it only on the client.
 */
export function client(
    loadingComponent: ComponentType<any>,
): <OwnProps>(
    component: ComponentType<OwnProps>,
) => FunctionComponent<OwnProps>;

export function resolve<
    OwnProps,
    K extends string,
    V,
    MoreProps = { [x: string]: any },
>(
    prop: K,
    resolveFn: ResolveFn<OwnProps & MoreProps, V>,
): (
    component: ComponentType<OwnProps & { [C in K]: V }>,
) => FunctionComponent<OwnProps & MoreProps>;

export function resolve<
    OwnProps,
    ResolvableProps = { [x: string]: any },
    MoreProps = { [x: string]: any },
>(
    resolversMap: {
        [K in keyof ResolvableProps]: ResolveFn<
            OwnProps & MoreProps,
            ResolvableProps[K]
        >;
    },
): (
    component: ComponentType<
        OwnProps & { [K in keyof ResolvableProps]?: ResolvableProps[K] }
    >,
) => FunctionComponent<OwnProps & MoreProps>;

Additional Details

  • Last updated: Tue, 02 Jan 2024 21:06:49 GMT
  • Dependencies: @types/react

Credits

These definitions were written by forabi.

FAQs

Package last updated on 02 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts