# @types/react-async-script

> TypeScript definitions for react-async-script

Latest version **1.2.5** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/react-async-script
pnpm add @types/react-async-script
yarn add @types/react-async-script
bun add @types/react-async-script
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.2.5 |
| Published | 2023-11-07 |
| First published | 2021-02-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 4.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51431 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/react-async-script
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-async-script
- npm.io page: https://npm.io/package/@types/react-async-script

## Dependencies (3)

- [@types/react](https://npm.io/package/@types/react.md) *
- [hoist-non-react-statics](https://npm.io/package/hoist-non-react-statics.md) ^3.3.1
- [@types/hoist-non-react-statics](https://npm.io/package/@types/hoist-non-react-statics.md) ^3.3.1

## Recent versions

- 1.2.5 (latest) — 2023-11-07
- 1.2.1 (ts3.6) — 2021-07-08
- 1.2.0 (ts3.4) — 2021-02-17
- 1.2.4 — 2023-10-18
- 1.2.3 — 2023-10-10
- 1.2.2 — 2023-09-27

## README

# Installation
> `npm install --save @types/react-async-script`

# Summary
This package contains type definitions for react-async-script (https://github.com/dozoisch/react-async-script).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-async-script.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-async-script/index.d.ts)
````ts
import * as React from "react";
import hoistNonReactStatics = require("hoist-non-react-statics");

interface Options {
    attributes?: { [key: string]: string } | undefined;
    callbackName?: string | undefined;
    globalName?: string | undefined;
    removeOnUnmount?: boolean | undefined;
    scriptId?: string | undefined;
}

/**
 * The Higher order Component function
 *
 * @param url
 * @param options
 */
declare function makeAsyncScript(
    url: string,
    options?: Options,
): <P>(
    Component: React.ComponentType<P>,
) => React.ComponentType<
    & P
    & hoistNonReactStatics.NonReactStatics<React.ComponentType<any>>
    & {
        asyncScriptOnLoad?: (() => void) | undefined;
    }
>;

export = makeAsyncScript;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: [@types/hoist-non-react-statics](https://npmjs.com/package/@types/hoist-non-react-statics), [@types/react](https://npmjs.com/package/@types/react), [hoist-non-react-statics](https://npmjs.com/package/hoist-non-react-statics)

# Credits
These definitions were written by [Michalis Zachariadis](https://github.com/mzachariadis).

---
_Source: https://npm.io/package/@types/react-async-script · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
