@types/loader-runner
TypeScript definitions for loader-runner
Last updated 5 years ago by types .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install @types/loader-runner 
SYNC missed versions from official npm registry.

Installation

npm install --save @types/loader-runner

Summary

This package contains type definitions for loader-runner (https://github.com/webpack/loader-runner.git).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/loader-runner.

index.d.ts

// Type definitions for loader-runner v2.2.0
// Project: https://github.com/webpack/loader-runner.git
// Definitions by: e-cloud <https://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: null | ((request: string) => string);
    pitch: null | ((request: string) => string);
    raw: string;
    data: any;
    pitchExecuted: boolean;
    normalExecuted: boolean;
}

export interface RunLoaderOption {
    resource: string;
    loaders: any[];
    context: any;
    readResource: (
        filename: string,
        callback: (err: NodeJS.ErrnoException | null, data: Buffer | null) => void
    ) => void;
}

export interface RunLoaderResult {
    result?: (Buffer | null)[] | undefined;
    resourceBuffer?: Buffer | null | undefined;
    cacheable: boolean;
    fileDependencies: string[];
    contextDependencies: string[];
}

export interface ExtendedLoaderContext {
    context: string | null;
    loaderIndex: number;
    loaders: Loader[];
    resourcePath: string | undefined;
    resourceQuery: string | undefined;
    async: (() => (() => void) | undefined) | null;
    callback: (() => void) | null;
    cacheable: (flag: boolean) => void;
    dependency: (file: string) => void;
    addDependency: (file: string) => void;
    addContextDependency: (context: string) => void;
    getDependencies: () => string[];
    getContextDependencies: () => string[];
    clearDependencies: () => void;
    resource: string;
    request: string;
    remainingRequest: string;
    currentRequest: string;
    previousRequest: string;
    query: {
        [key: string]: any;
    } | string;
    data: any;
}

export function getContext(resource: string): string;

export function runLoaders(
    options: RunLoaderOption,
    callback: (err: NodeJS.ErrnoException | null, result: RunLoaderResult) => any
): void;



Additional Details

  • Last updated: Tue, 06 Jul 2021 22:02:42 GMT
  • Dependencies: @types/node
  • Global values: none

Credits

These definitions were written by e-cloud.

Current Tags

  • 2.2.4                                ...           latest (5 years ago)
  • 2.2.3                                ...           ts2.0 (9 years ago)
  • 2.2.3                                ...           ts2.1 (9 years ago)
  • 2.2.3                                ...           ts2.2 (9 years ago)
  • 2.2.3                                ...           ts2.3 (9 years ago)
  • 2.2.3                                ...           ts2.4 (9 years ago)
  • 2.2.3                                ...           ts2.5 (9 years ago)
  • 2.2.3                                ...           ts2.6 (9 years ago)
  • 2.2.3                                ...           ts2.7 (9 years ago)
  • 2.2.3                                ...           ts2.8 (9 years ago)
  • 2.2.3                                ...           ts2.9 (9 years ago)
  • 2.2.3                                ...           ts3.0 (9 years ago)
  • 2.2.3                                ...           ts3.1 (9 years ago)
  • 2.2.3                                ...           ts3.2 (9 years ago)
  • 2.2.3                                ...           ts3.3 (9 years ago)
  • 2.2.3                                ...           ts3.4 (9 years ago)
  • 2.2.3                                ...           ts3.5 (9 years ago)
  • 2.2.4                                ...           ts3.6 (5 years ago)
  • 2.2.4                                ...           ts3.7 (5 years ago)
  • 2.2.4                                ...           ts3.8 (5 years ago)
  • 2.2.4                                ...           ts3.9 (5 years ago)
  • 2.2.4                                ...           ts4.0 (5 years ago)
  • 2.2.4                                ...           ts4.1 (5 years ago)
  • 2.2.4                                ...           ts4.2 (5 years ago)
  • 2.2.4                                ...           ts4.3 (5 years ago)
  • 2.2.4                                ...           ts4.4 (5 years ago)
  • 2.2.4                                ...           ts4.5 (5 years ago)
  • 2.2.4                                ...           ts4.6 (5 years ago)
  • 2.2.4                                ...           ts4.7 (5 years ago)
  • 2.2.4                                ...           ts4.8 (5 years ago)
  • 2.2.4                                ...           ts4.9 (5 years ago)

5 Versions

  • 2.2.4                                ...           5 years ago
  • 2.2.3                                ...           9 years ago
  • 2.2.2                                ...           9 years ago
  • 2.2.1                                ...           9 years ago
  • 2.2.0                                ...           9 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 2
Last Month 0
Dependencies (1)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org | Home |