# @types/lambda-wrapper

> TypeScript definitions for lambda-wrapper

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

## Install

```sh
npm install @types/lambda-wrapper
pnpm add @types/lambda-wrapper
yarn add @types/lambda-wrapper
bun add @types/lambda-wrapper
```

## 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; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.3.4 |
| Published | 2023-11-07 |
| First published | 2020-02-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51443 |
| Maintainers | types |

## Links

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

## Dependencies (1)

- [@types/aws-lambda](https://npm.io/package/@types/aws-lambda.md) *

## Recent versions

- 0.3.4 (latest) — 2023-11-07
- 0.3.2 (ts4.3) — 2023-08-30
- 0.3.1 (ts3.6) — 2021-07-08
- 0.3.0 (ts3.3) — 2020-02-19
- 0.3.3 — 2023-10-18

## README

# Installation
> `npm install --save @types/lambda-wrapper`

# Summary
This package contains type definitions for lambda-wrapper (https://github.com/nordcloud/lambda-wrapper).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lambda-wrapper.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lambda-wrapper/index.d.ts)
````ts
import { Callback, Context, Handler } from "aws-lambda";

export interface Wrapped<TEvent, TResult> {
    // None of these functions resolve the promise if a callback is present, so prohibit using both.
    run(event: TEvent, context: Partial<Context>, callback: Callback<TResult>): void;
    run(event: TEvent, callback: Callback<TResult>): void;
    run(event: TEvent, context?: Partial<Context>): Promise<TResult>;

    runHandler(event: TEvent, context: Partial<Context>, callback?: Callback<TResult>): void;
    runHandler(event: TEvent, context: Partial<Context>): Promise<TResult>;
}

export function wrap<TEvent, TResult, THandlerName extends string = "handler">(
    mod: { [name in THandlerName]: Handler<TEvent, TResult> },
    options?: { handler?: THandlerName | undefined },
): Wrapped<TEvent, TResult>;
export function wrap(mod: { lambdaFunction: string; region: string }, options?: {}): Wrapped<any, any>;

// Legacy (pre-v0.1) API for backwards compatibility
export function init(mod: any, options: any): void;
export function run(event: any, context: Partial<Context>, callback: Callback): Promise<any>;
export function run(event: any, callback: Callback): Promise<any>;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:38 GMT
 * Dependencies: [@types/aws-lambda](https://npmjs.com/package/@types/aws-lambda)

# Credits
These definitions were written by [Gaelan Steele](https://github.com/Gaelan).

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