Socket
Socket
Sign inDemoInstall

@types/ejs

Package Overview
Dependencies
0
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @types/ejs

TypeScript definitions for ejs


Version published
Weekly downloads
4.4M
decreased by-5.81%
Maintainers
1
Install size
16.6 kB
Created
Weekly downloads
 

Package description

What is @types/ejs?

The @types/ejs package provides TypeScript type definitions for EJS (Embedded JavaScript templates). This allows TypeScript developers to use EJS in their projects with the benefits of type checking and IntelliSense support in IDEs. The package does not contain functionality by itself but supports the EJS templating engine by providing types for better development experience in TypeScript environments.

What are @types/ejs's main functionalities?

Type Definitions for EJS Functions

Provides type definitions for the `render` function of EJS, enabling type checking and auto-completion features in TypeScript projects.

import * as ejs from 'ejs';

let html: string = ejs.render('Hello <%= user %>!', { user: 'Alice' });

Type Definitions for EJS Configuration Options

Includes type definitions for configuration options in EJS, such as `cache` and `async`, ensuring that developers use the correct types and values when configuring EJS options.

import * as ejs from 'ejs';

ejs.renderFile('template.ejs', { user: 'Bob' }, { cache: true, async: false }, function(err, str) {
  // str: rendered HTML string
});

Other packages similar to @types/ejs

Readme

Source

Installation

npm install --save @types/ejs

Summary

This package contains type definitions for ejs (http://ejs.co/).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ejs.

Additional Details

  • Last updated: Mon, 15 Feb 2021 21:15:22 GMT
  • Dependencies: none
  • Global values: ejs

Credits

These definitions were written by Ben Liddicott, ExE Boss, and Piotr Błażejewicz.

FAQs

Last updated on 15 Feb 2021

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