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

Comparing version 3.0.7 to 3.1.0

30

ejs/index.d.ts

@@ -1,2 +0,2 @@

// Type definitions for ejs 3.0
// Type definitions for ejs 3.1
// Project: http://ejs.co/, https://github.com/mde/ejs

@@ -34,5 +34,11 @@ // Definitions by: Ben Liddicott <https://github.com/benliddicott>

*/
export function compile(template: string, opts: Options & { async: true; client?: false | undefined }): AsyncTemplateFunction;
export function compile(
template: string,
opts: Options & { async: true; client?: false | undefined },
): AsyncTemplateFunction;
export function compile(template: string, opts: Options & { async: true; client: true }): AsyncClientFunction;
export function compile(template: string, opts?: Options & { async?: false | undefined; client?: false | undefined }): TemplateFunction;
export function compile(
template: string,
opts?: Options & { async?: false | undefined; client?: false | undefined },
): TemplateFunction;
export function compile(template: string, opts?: Options & { async?: false | undefined; client: true }): ClientFunction;

@@ -283,2 +289,15 @@ export function compile(template: string, opts?: Options): TemplateFunction | AsyncTemplateFunction;

/**
* An object where {@link filename} is the final parsed path or {@link template} is the content of the included template
*/
export type IncluderResult = { filename: string; template?: never } | { template: string; filename?: never };
/**
* @param originalPath the path as it appears in the include statement
* @param parsedPath the previously resolved path
*
* @return An {@link IncluderResult} object containing the filename or template data.
*/
export type IncluderCallback = (originalPath: string, parsedPath: string) => IncluderResult;
export interface Options {

@@ -440,2 +459,7 @@ /**

views?: string[] | undefined;
/**
* Custom function to handle EJS includes
*/
includer?: IncluderCallback;
}

@@ -442,0 +466,0 @@

4

ejs/package.json
{
"name": "@types/ejs",
"version": "3.0.7",
"version": "3.1.0",
"description": "TypeScript definitions for ejs",

@@ -33,4 +33,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ejs",

"dependencies": {},
"typesPublisherContentHash": "63ea1bff6f913f198b4d9039eaa506a9bc1fee7514d4b5c45f52e68c9c6832e7",
"typesPublisherContentHash": "a21b359e45a41ade7b44c9af7e93461dfeda66731eb9e106816485078a98ca23",
"typeScriptVersion": "3.6"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Tue, 06 Jul 2021 19:03:04 GMT
* Last updated: Tue, 17 Aug 2021 22:31:24 GMT
* Dependencies: none

@@ -14,0 +14,0 @@ * Global values: `ejs`

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