# @types/nice-try

> TypeScript definitions for nice-try

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

## Install

```sh
npm install @types/nice-try
pnpm add @types/nice-try
yarn add @types/nice-try
bun add @types/nice-try
```

## 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 | 2.1.2 |
| Published | 2023-11-07 |
| First published | 2020-01-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51451 |
| Maintainers | types |

## Links

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

## Recent versions

- 2.1.2 (latest) — 2023-11-07
- 2.1.0 (ts3.2) — 2020-10-15
- 2.0.0 (ts2.8) — 2020-01-23
- 2.1.1 — 2023-10-18

## README

# Installation
> `npm install --save @types/nice-try`

# Summary
This package contains type definitions for nice-try (https://github.com/electerious/nice-try).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/nice-try.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/nice-try/index.d.ts)
````ts
declare const niceTry: {
    <T>(fn: () => T): T | undefined;
    (val?: any): undefined;

    promise<T>(fn: (() => PromiseLike<T>) | (() => T)): Promise<T | undefined>;
    promise(val?: any): Promise<undefined>;
};

export = niceTry;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: none

# Credits
These definitions were written by [Richie Bendall](https://github.com/Richienb).

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