Socket
Socket
Sign inDemoInstall

@types/babel__template

Package Overview
Dependencies
5
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @types/babel__template

TypeScript definitions for @babel/template


Version published
Weekly downloads
23M
increased by1.56%
Maintainers
1
Install size
4.19 MB
Created
Weekly downloads
 

Package description

What is @types/babel__template?

The @types/babel__template package provides TypeScript type definitions for the babel-template package, which is a part of the Babel toolchain. It allows developers to use Babel's template function in TypeScript projects with type safety. The template function is used to create AST nodes from a string template.

What are @types/babel__template's main functionalities?

Type-safe template instantiation

This feature allows developers to instantiate Babel templates with type safety, ensuring that the variables and their types are correctly used within the template.

import template from '@babel/template';
import { Statement } from '@babel/types';

const buildRequire = template(`
  const IMPORT_NAME = require(SOURCE);
`);

const ast: Statement = buildRequire({
  IMPORT_NAME: 'myModule',
  SOURCE: '"my-module"'
});

Other packages similar to @types/babel__template

Readme

Source

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.

Additional Details

Credits

These definitions were written by Troy Gerwien, Marvin Hagemeister, Melvin Groenhoff, and ExE Boss.

FAQs

Last updated on 06 Nov 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc