7.1.5 • Published 7 months ago

@types/squirrelly v7.1.5

Weekly downloads
892
License
MIT
Repository
github
Last release
7 months ago

Installation

npm install --save @types/squirrelly

Summary

This package contains type definitions for squirrelly (https://squirrelly.js.org).

Details

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

index.d.ts

// Type definitions for squirrelly 7.1
// Project: https://squirrelly.js.org
// Definitions by: Florian Keller <https://github.com/ffflorian>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2

export as namespace Sqrl;

export interface Options {
    $cache?: boolean | undefined;
    $file?: string | undefined;
    $name?: string | undefined;
}

export interface NativeHelper {
    blocks?: Blocks | undefined;
    helperEnd?: (() => string) | undefined;
    helperStart?: ((param?: string, id?: string) => string) | undefined;
    selfClosing?: ((param?: string) => string) | undefined;
}

export type Blocks = Record<string, () => string>;
export type SqrlFn = (options: object, Sqrl: any) => string;
export type HelperCallback = (args: string[], content: () => string, blocks: Blocks) => string;

export function __express(filePath: string, options: object, callback: (...args: any[]) => any): void;

export function autoEscaping<T extends boolean>(bool: T): T;
export function Compile(str: string): SqrlFn;
export function defaultTags(tagArray: string[]): void;
export function defineFilter(name: string, callback: (str: string) => string): void;
export function defineHelper(name: string, callback: HelperCallback): void;
export function defineNativeHelper(name: string, obj: NativeHelper): void;
export function definePartial(name: string, str: string): void;
export function load(options: Options): SqrlFn | string;
export function load(options: Options, str: string): SqrlFn;
export function Render(template: string | SqrlFn, options: object): string;
export function renderFile(filePath: string, options: object): string;
export function setDefaultFilters(obj: 'clear' | Record<string, boolean>): void;

export namespace F {
    function e(str: string): string;
}

Additional Details

  • Last updated: Tue, 06 Jul 2021 16:35:13 GMT
  • Dependencies: none
  • Global values: Sqrl

Credits

These definitions were written by Florian Keller.

7.1.5

7 months ago

7.1.4

7 months ago

7.1.3

8 months ago

7.1.2

3 years ago

7.1.1

4 years ago

7.1.0

5 years ago