mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-02-03 15:37:31 +00:00
36 lines
890 B
TypeScript
36 lines
890 B
TypeScript
// Type definitions for loader-runner v2.2.0
|
|
// Project: http://github.com/webpack/loader-runner.git
|
|
// Definitions by: e-cloud <http://github.com/e-cloud>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
/// <reference types="node" />
|
|
|
|
export interface Loader {
|
|
path: string;
|
|
query: string;
|
|
request: string;
|
|
options: any;
|
|
normal: any;
|
|
pitch: any;
|
|
raw: string;
|
|
data: any;
|
|
pitchExecuted: boolean;
|
|
normalExecuted: boolean;
|
|
}
|
|
|
|
export function getContext(resource: string): string;
|
|
|
|
export interface RunLoaderOption {
|
|
resource: string;
|
|
loaders: any[];
|
|
context: any;
|
|
readResource: (filename: string, callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void) => void;
|
|
}
|
|
|
|
export function runLoaders(
|
|
options: RunLoaderOption,
|
|
callback: (err: NodeJS.ErrnoException | null, result: any) => any
|
|
): void;
|
|
|
|
|