Skip to content

Latest commit

 

History

History
35 lines (25 loc) · 1.31 KB

File metadata and controls

35 lines (25 loc) · 1.31 KB

Userscript type definitions

tampermonkey greasemonkey violentmonkey

Vendored GM_* / GM.* declarations for Tampermonkey, Greasemonkey and Violentmonkey. Pick one manager — do not mix them in the same project.

Synced versions are recorded in sources.json.

Usage

{
  "compilerOptions": {
    "types": [
      "vite-userscript-plugin/types/tampermonkey"
    ]
  }
}
/// <reference types="vite-userscript-plugin/types/tampermonkey" />

Replace tampermonkey with greasemonkey or violentmonkey as needed.

Sync

pnpm sync-types

Copies the latest official index.d.ts from npm into this folder. Violentmonkey package-refs (chrome-types, @types/firefox-webext-browser, …) are rewritten to the local violentmonkey-ambient.d.ts stub so consumers do not need those packages.