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

3.1.4 • Public • Published

Installation

npm install --save @types/react-codesandboxer

Summary

This package contains type definitions for react-codesandboxer (https://github.com/codesandbox/codesandboxer#readme).

Details

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

index.d.ts

import * as React from "react";

export interface GitInfo {
    account: string;
    repository: string;
    branch?: string | undefined;
    host: "bitbucket" | "github";
}

export interface Files {
    [key: string]: { content: string };
}

export interface Package {
    name: string;
    version: string;
    dependencies: {
        [key: string]: string;
    };
    devDependencies: {
        [key: string]: string;
    };
    peerDependencies: {
        [key: string]: string;
    };
}

export type ImportReplacement = [string, string];

export interface Error {
    name: string;
    description?: string | undefined;
    content?: string | undefined;
}

export interface State {
    parameters: string;
    isLoading: boolean;
    isDeploying: boolean;
    sandboxId?: string | undefined;
    sandboxUrl?: string | undefined;
    deployPromise?: Promise<any> | undefined;
    files?: Files | undefined;
    error?: Error | undefined;
    fileName: string;
}

export interface Props {
    examplePath: string;
    name?: string | undefined;
    gitInfo: GitInfo;
    example?: string | Promise<string> | undefined;
    pkgJSON?: Package | string | Promise<Package | string> | undefined;
    importReplacements?: ImportReplacement[] | undefined;
    dependencies?: { [key: string]: string } | undefined;
    skipRedirect?: boolean | undefined;
    ignoreInternalImports?: boolean | undefined;
    preload?: boolean | undefined;
    autoDeploy?: boolean | undefined;
    onLoadComplete?:
        | ((
            arg: { parameters: string; files: Files } | { error: any },
        ) => unknown)
        | undefined;
    afterDeploy?: ((sandboxUrl: string, sandboxId: string) => unknown) | undefined;
    afterDeployError?: ((error: Error) => unknown) | undefined;
    providedFiles?: Files | undefined;
    children: (obj: {
        isLoading: boolean;
        files?: Files | undefined;
        sandboxId?: string | undefined;
        sandboxUrl?: string | undefined;
    }) => React.ReactNode;
    style?: object | undefined;
    extensions?: string[] | undefined;
    template?: "create-react-app" | "create-react-app-typescript" | "vue-cli" | undefined;
}

export default class CodeSandboxDeployer extends React.Component<Props, State> {}

Additional Details

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

Credits

These definitions were written by Nathan Bierema.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/react-codesandboxer

Weekly Downloads

48

Version

3.1.4

License

MIT

Unpacked Size

7.22 kB

Total Files

5

Last publish

Collaborators

  • types