Skip to main content
Module.LoadHook - node__module.d.ts - Node documentation
type alias Module.LoadHook

Usage in Deno

```typescript import { Module } from "node:node__module.d.ts"; ```
The `load` hook provides a way to define a custom method of determining how a URL should be interpreted, retrieved, and parsed. It is also in charge of validating the import assertion.

Definition

(
url: string,
context: LoadHookContext,
nextLoad: (
url: string,
context?: LoadHookContext,
) => LoadFnOutput | Promise<LoadFnOutput>
,
) => LoadFnOutput | Promise<LoadFnOutput>