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

Source
npmnpm
Version
3.1.4
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

// Type definitions for react-resolver 3.1
// Project: https://github.com/ericclemmons/react-resolver
// Definitions by: forabi <https://github.com/forabi>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8

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: Wed, 27 Sep 2023 07:12:04 GMT
  • Dependencies: @types/react
  • Global values: none

Credits

These definitions were written by forabi.

FAQs

Package last updated on 27 Sep 2023

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