Skip to main content
Module

x/dnt/mod.ts>ShimOptions

Deno to npm package build tool.
Go to Latest
interface ShimOptions
Re-export
import { type ShimOptions } from "https://deno.land/x/dnt@0.30.0/mod.ts";

Provide true to use the shim in both the distributed code and test code, "dev" to only use it in the test code, or false to not use the shim at all.

Properties

optional
deno: ShimValue | { test: ShimValue; }

Shim the Deno namespace.

optional
timers: ShimValue

Shim the global setTimeout and setInterval functions with Deno and browser compatible versions.

optional
prompts: ShimValue

Shim the global confirm, alert, and prompt functions.

optional
blob: ShimValue

Shim the Blob global with the one from the "buffer" module.

optional
crypto: ShimValue

Shim the crypto global.

optional
domException: ShimValue

Shim DOMException using the "domexception" package (https://www.npmjs.com/package/domexception)

optional
undici: ShimValue

Shim fetch, File, FormData, Headers, Request, and Response by using the "undici" package (https://www.npmjs.com/package/undici).

optional
weakRef: ShimValue

Use a sham for the WeakRef global, which uses globalThis.WeakRef when it exists. The sham will throw at runtime when calling deref() and WeakRef doesn't globally exist, so this is only intended to help type check code that won't actually use it.

optional
webSocket: boolean | "dev"

Shim WebSocket with the ws package (https://www.npmjs.com/package/ws).

optional
custom: Shim[]

Custom shims to use.

optional
customDev: Shim[]

Custom shims to use only for the test code.