UNPKG

1.98 kBMarkdownView Raw
1# Installation
2> `npm install --save @types/jade`
3
4# Summary
5This package contains type definitions for jade (https://github.com/jadejs/jade).
6
7# Details
8Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jade.
9## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jade/index.d.ts)
10````ts
11export type JadeCustomFilterFunction = (text: string, options: {
12 [key: string]: boolean;
13}) => string;
14
15export interface JadeOptions {
16 filename?: string | undefined;
17 basedir?: string | undefined;
18 doctype?: string | undefined;
19 pretty?: boolean | string | undefined;
20 filters?: {
21 [key: string]: JadeCustomFilterFunction;
22 } | undefined;
23 self?: boolean | undefined;
24 debug?: boolean | undefined;
25 compileDebug?: boolean | undefined;
26 globals?: string[] | undefined;
27 cache?: boolean | undefined;
28 inlineRuntimeFunctions?: boolean | undefined;
29 name?: string | undefined;
30}
31
32export interface TemplateLocals {
33 [key: string]: any;
34}
35
36export type JadeGenerationFunction = (locals?: TemplateLocals) => string;
37
38export declare function compile(template: string, options?: JadeOptions): JadeGenerationFunction;
39export declare function compileFile(path: string, options?: JadeOptions): JadeGenerationFunction;
40export declare function compileClient(template: string, options?: JadeOptions): JadeGenerationFunction;
41export declare function compileClientWithDependenciesTracked(template: string, options?: JadeOptions): {
42 body: JadeGenerationFunction;
43 dependencies: string[];
44};
45export declare function render(template: string, options?: JadeOptions): string;
46export declare function renderFile(path: string, options?: JadeOptions): string;
47
48````
49
50### Additional Details
51 * Last updated: Tue, 07 Nov 2023 03:09:37 GMT
52 * Dependencies: none
53
54# Credits
55These definitions were written by [Panu Horsmalahti](https://github.com/panuhorsmalahti).
56
\No newline at end of file