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

1.0.10 • Public • Published

Installation

npm install --save @types/react-app

Summary

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

Details

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

index.d.ts

import * as React from "react";

export interface LinkProps {
    to: string;
    onClick?(): void;
    className?: string | undefined;
}

export interface LayoutProps {
    className: string;
}

export interface RouteProps { // takes the form of universal-router routes
    path: string;
    children: ChildProps[];
}

export interface ChildProps {
    path: string;
    action(params: any): any;
}

export interface CreateAppObject {
    routes: RouteProps;
    context: {};
    container: Element | null;
}

// exporting the createApp function
export function createApp(createAppObject: CreateAppObject): React.JSX.Element;

export class Link extends React.Component<LinkProps> {}
export class Layout extends React.Component<LayoutProps> {}
export class Header extends React.Component {}
export class Navigation extends React.Component {}

Additional Details

  • Last updated: Wed, 06 Dec 2023 06:08:17 GMT
  • Dependencies: @types/react

Credits

These definitions were written by Prakarsh Pandey.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/react-app

Weekly Downloads

152

Version

1.0.10

License

MIT

Unpacked Size

4.33 kB

Total Files

5

Last publish

Collaborators

  • types