🚀 Socket Launch Week 🚀 Day 2: Introducing Repository Labels and Security Policies.Learn More
Socket
Sign inDemoInstall
Socket

@types/swig-email-templates

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/swig-email-templates

TypeScript definitions for swig-email-templates

7.0.3
ts4.5
ts4.6
ts4.7
ts4.8
ts4.9
ts5.0
ts5.1
ts5.2
ts5.3
ts5.4
ts5.5
ts5.6
ts5.7
ts5.8
ts5.9
latest
Source
npm
Version published
Weekly downloads
747
10.5%
Maintainers
1
Weekly downloads
 
Created
Source

Installation

npm install --save @types/swig-email-templates

Summary

This package contains type definitions for swig-email-templates (https://github.com/andrewrk/swig-email-templates).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/swig-email-templates.

index.d.ts

/// <reference types="jquery" />

import swig = require("swig");

type SwigRender<T> = (file: string, context: T, callback: (err: any, html: string, text: string) => any) => any;

interface SwigEmailTemplatesOptions extends swig.SwigOptions {
    root?: string | undefined;
    juice?: any;
    rewriteUrl?: ((href: string) => string) | undefined;
    rewrite?: (($: JQueryStatic) => void) | undefined;
}

declare class EmailTemplates {
    constructor(options?: SwigEmailTemplatesOptions);

    generateText(templatePath: string, context: any, html: string, cb: (error: any, text: string | null) => void): void;
    generateSubject(templatePath: string, context: any, cb: (error: any, text: string | null) => void): void;
    rewriteUrls($: JQueryStatic, rewrite: (href: string) => void): void;
    render(
        templatePath: string,
        context: any,
        cb: (error: any, inlinedHTML?: string, text?: string, subject?: string) => void,
    ): void;
    /** @async */
    render(templatePath: string, context: any): Promise<{ html?: string; text?: string; subject?: string }>;
}

export = EmailTemplates;

Additional Details

  • Last updated: Tue, 07 Nov 2023 15:11:36 GMT
  • Dependencies: @types/jquery, @types/swig

Credits

These definitions were written by Adam Babcock, and Satana Charuwichitratana.

FAQs

Package last updated on 07 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts