# @types/babel-template

> TypeScript definitions for babel-template

Latest version **6.25.5** (published 2023-11-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/babel-template
pnpm add @types/babel-template
yarn add @types/babel-template
bun add @types/babel-template
```

## 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 | 6.25.5 |
| Published | 2023-11-06 |
| First published | 2016-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51432 |
| Maintainers | types |

## Links

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

## Dependencies (2)

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

## Recent versions

- 6.25.5 (latest) — 2023-11-06
- 6.25.2 (ts2.8) — 2019-02-13
- 6.25.0 (ts2.3) — 2017-07-27
- 6.7.14 (ts2.0) — 2016-09-19
- 6.25.4 — 2023-10-17
- 6.25.3 — 2023-09-15
- 6.25.1 — 2018-06-12
- 6.7.16 — 2017-07-25
- 6.7.15 — 2017-07-20
- 6.7.13 — 2016-07-14
- 6.7.12-alpha — 2016-07-08
- 6.7.11-alpha — 2016-07-03
- 6.7.10-alpha — 2016-07-02
- 6.7.9-alpha — 2016-07-01
- 6.7.8-alpha — 2016-05-25
- … 3 more at https://npm.io/package/@types/babel-template/versions

## README

# Installation
> `npm install --save @types/babel-template`

# Summary
This package contains type definitions for babel-template (https://github.com/babel/babel/tree/master/packages/babel-template).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel-template.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel-template/index.d.ts)
````ts
import * as t from "babel-types";
import { BabylonOptions } from "babylon";
type Node = t.Node;

// NB: This export doesn't match the handbook example, where `template` is the default export.
// But it does match the runtime behaviour (at least at the time of this writing). For some reason,
// babel-template/lib/index.js has this line at the bottom: module.exports = exports["default"];
export = template;
declare function template(code: string, opts?: BabylonOptions): UseTemplate;

type UseTemplate = (nodes?: { [placeholder: string]: Node }) => Node;

````

### Additional Details
 * Last updated: Mon, 06 Nov 2023 22:41:04 GMT
 * Dependencies: [@types/babel-types](https://npmjs.com/package/@types/babel-types), [@types/babylon](https://npmjs.com/package/@types/babylon)

# Credits
These definitions were written by [Troy Gerwien](https://github.com/yortus), and [Marvin Hagemeister](https://github.com/marvinhagemeister).

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