Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/nunjucks

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/nunjucks - npm Package Compare versions

Comparing version 3.1.5 to 3.2.0

70

nunjucks/index.d.ts

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

// Type definitions for nunjucks 3.1
// Type definitions for nunjucks 3.2
// Project: http://mozilla.github.io/nunjucks/, https://github.com/mozilla/nunjucks

@@ -8,6 +8,3 @@ // Definitions by: Ruben Slabbert <https://github.com/RubenSlabbert>

export type TemplateCallback<T> = (
err: lib.TemplateError | null,
res: T | null,
) => void;
export type TemplateCallback<T> = (err: lib.TemplateError | null, res: T | null) => void;
export type Callback<E, T> = (err: E | null, res: T | null) => void;

@@ -33,7 +30,7 @@

exclude?: string[] | undefined;
wrapper?(templates: { name: string, template: string }, opts: PrecompileOptions): string;
wrapper?(templates: { name: string; template: string }, opts: PrecompileOptions): string;
}
export class Template {
constructor(src: string, env?: Environment, eagerCompile?: boolean);
constructor(src: string, env?: Environment, path?: string, eagerCompile?: boolean);
render(context?: object): string;

@@ -53,15 +50,19 @@ render(context?: object, callback?: TemplateCallback<string>): void;

noCache?: boolean | undefined;
web?: {
useCache?: boolean | undefined,
async?: boolean | undefined
} | undefined;
web?:
| {
useCache?: boolean | undefined;
async?: boolean | undefined;
}
| undefined;
express?: object | undefined;
tags?: {
blockStart?: string | undefined,
blockEnd?: string | undefined,
variableStart?: string | undefined,
variableEnd?: string | undefined,
commentStart?: string | undefined,
commentEnd?: string | undefined
} | undefined;
tags?:
| {
blockStart?: string | undefined;
blockEnd?: string | undefined;
variableStart?: string | undefined;
variableEnd?: string | undefined;
commentStart?: string | undefined;
commentEnd?: string | undefined;
}
| undefined;
}

@@ -96,2 +97,7 @@

express(app: object): void;
on(
event: 'load',
fn: (name: string, source: { src: string; path: string; noCache: boolean }, loader: Loader) => void,
): void;
}

@@ -129,18 +135,30 @@

export interface FileSystemLoaderOptions {
export interface LoaderOptions {
/** if true, the system will automatically update templates when they are changed on the filesystem */
watch?: boolean | undefined;
watch?: boolean;
/** if true, the system will avoid using a cache and templates will be recompiled every single time */
noCache?: boolean | undefined;
noCache?: boolean;
}
export type FileSystemLoaderOptions = LoaderOptions;
export type NodeResolveLoaderOptions = LoaderOptions;
export class FileSystemLoader extends Loader implements ILoader {
init(searchPaths: string[], opts: any): void;
constructor(searchPaths?: string | string[], opts?: FileSystemLoaderOptions);
getSource(name: string): LoaderSource;
constructor(searchPaths?: string | string[], opts?: FileSystemLoaderOptions);
}
export class NodeResolveLoader extends Loader implements ILoader {
constructor(searchPaths?: string | string[], opts?: NodeResolveLoaderOptions);
getSource(name: string): LoaderSource;
}
export interface WebLoaderOptions {
useCache?: boolean;
async?: boolean;
}
export class WebLoader extends Loader implements ILoader {
constructor(baseUrl: string, opts?: any);
constructor(baseUrl?: string, opts?: WebLoaderOptions);
getSource(name: string): LoaderSource;

@@ -150,3 +168,3 @@ }

export class PrecompiledLoader extends Loader implements ILoader {
init(searchPaths: string[], opts: any): void;
constructor(compiledTemplates?: any[]);
getSource(name: string): LoaderSource;

@@ -153,0 +171,0 @@ }

{
"name": "@types/nunjucks",
"version": "3.1.5",
"version": "3.2.0",
"description": "TypeScript definitions for nunjucks",

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

"dependencies": {},
"typesPublisherContentHash": "8dcdd81bd30383d8a85c8a7fc288d44251c6b9e5ca70ffb2cd048ab9a1437447",
"typeScriptVersion": "3.6"
"typesPublisherContentHash": "4ee8cae1d80096bafcfb0ae55630bb88b7ab5b7d5ef06d6cd8543778525882cb",
"typeScriptVersion": "3.7"
}

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

### Additional Details
* Last updated: Wed, 07 Jul 2021 16:31:36 GMT
* Last updated: Tue, 14 Sep 2021 18:01:30 GMT
* Dependencies: none

@@ -14,0 +14,0 @@ * Global values: none

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc