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