@types/jade
TypeScript icon, indicating that this package has built-in type declarations

0.0.34 • Public • Published

Installation

npm install --save @types/jade

Summary

This package contains type definitions for jade (https://github.com/jadejs/jade).

Details

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

index.d.ts

export type JadeCustomFilterFunction = (text: string, options: {
    [key: string]: boolean;
}) => string;

export interface JadeOptions {
    filename?: string | undefined;
    basedir?: string | undefined;
    doctype?: string | undefined;
    pretty?: boolean | string | undefined;
    filters?: {
        [key: string]: JadeCustomFilterFunction;
    } | undefined;
    self?: boolean | undefined;
    debug?: boolean | undefined;
    compileDebug?: boolean | undefined;
    globals?: string[] | undefined;
    cache?: boolean | undefined;
    inlineRuntimeFunctions?: boolean | undefined;
    name?: string | undefined;
}

export interface TemplateLocals {
    [key: string]: any;
}

export type JadeGenerationFunction = (locals?: TemplateLocals) => string;

export declare function compile(template: string, options?: JadeOptions): JadeGenerationFunction;
export declare function compileFile(path: string, options?: JadeOptions): JadeGenerationFunction;
export declare function compileClient(template: string, options?: JadeOptions): JadeGenerationFunction;
export declare function compileClientWithDependenciesTracked(template: string, options?: JadeOptions): {
    body: JadeGenerationFunction;
    dependencies: string[];
};
export declare function render(template: string, options?: JadeOptions): string;
export declare function renderFile(path: string, options?: JadeOptions): string;

Additional Details

  • Last updated: Tue, 07 Nov 2023 03:09:37 GMT
  • Dependencies: none

Credits

These definitions were written by Panu Horsmalahti.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/jade

Weekly Downloads

10,807

Version

0.0.34

License

MIT

Unpacked Size

5.31 kB

Total Files

5

Last publish

Collaborators

  • types