@scml/mod-sweet-alert2

TypeScript type definitions for SweetAlert2 mod, wrapping SweetAlert2 for SugarCube mod use.

Installation

npm
yarn
pnpm
bun
deno
npm install -D @scml/mod-sweet-alert2

Quick Start

Add type reference

/// <reference types="@scml/mod-sweet-alert2" />

Use global instance

modSweetAlert2Mod is mounted on window.

Global Types global

PropertyTypeDescription
modSweetAlert2ModSweetAlert2ModSweetAlert2 mod instance

Subpath Exports

SubpathDescription
.Main entry
./SweetAlert2ModMain class

API Reference

SweetAlert2Mod class

Provides fire (typeof Swal.fire), fireWithOptions(options), and Swal (typeof SweetAlert2).

Type Definition Source

INFO