Installation
npm install --save @types/insert-module-globals
Summary
This package contains type definitions for insert-module-globals (https://github.com/browserify/insert-module-globals).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/insert-module-globals.
import * as stream from "stream";
export = InsertModuleGlobals;
interface InsertModuleGlobals {
(file: string, opts?: InsertModuleGlobals.Options): stream.Transform;
readonly vars: {
process(file: string): string;
global(): string;
"Buffer.isBuffer"(file: string): string;
Buffer(): string;
__filename(file: string, basedir: string): string;
__dirname(file: string, basedir: string): string;
};
}
declare const InsertModuleGlobals: InsertModuleGlobals;
declare namespace InsertModuleGlobals {
interface Options {
always?: boolean | undefined;
vars?: VarsOption | undefined;
debug?: boolean | undefined;
basedir?: string | undefined;
}
interface VarsOption {
[name: string]: InsertFunction | undefined;
}
type InsertFunction = (file: string, basedir: string) => VariableConfig | string;
interface VariableConfig {
id: string;
source: string;
suffix?: string | undefined;
}
}
Additional Details
- Last updated: Wed, 18 Oct 2023 01:17:35 GMT
- Dependencies: @types/node
Credits
These definitions were written by Leonard Thieu.