DefinitelyTyped/loader-runner/index.d.ts
Andy 05e9c858cf Merge 20dec (#13471)
* base-64 typings

* formatting and indenting

* feat: add typings for watchpack

* fix: improve missing typings

* Port from https://github.com/agileek/typings-vis/blob/master/vs.d.ts

* Fix travis build failures

* Port PR https://github.com/agileek/typings-vis/pull/12

* Fix travis build failures

* added tsconfig and tslint

* removed patch number

* added tests

* made it export like base64-js

* removed old code

* formatted code

* fix: add files field in tsconfig.json for expected publishment

* fix: improve most missing typings

* feat: upgrade to v3.0.0

* feat: upgrade to tapbale v0.2.5

* Types 2.0 (#13261)

* updating typing of the latest 7.0 react-autosuggest

* updating typing of react-autosuggest 7.0

* update typings for react-autosuggest 7.0

* Remove '+' from header versions, so they can be parsed (#13239)

* Updated masonry-layout to fix linting errors (#13272)

* Updated masonry-layout to fix linting errors

* Fixed the tests I could fix.

* Removed patch version

* Add redux-persist and basic transformers (#13389)

* Add definitions for redux-persist

* Add missin generic types

* Add definitions for filter transformer

* Add definitions for encrypt transformer

* Fix header

* Add definitions for compress transformer

* Delete unnecessary linter configs

* Change way of importing, fix tests

* fix: angulartics type definition for ES6 import

* fix: lint error

* fix scalar type config (#13398)

The `GraphQLScalarTypeConfig` interface had incorrect types. Correct types may be seen here: 379a308439/src/type/definition.js (L348-L350)

* [interact.js] Update module names (#13316)

Update CommonJS module name as it was changed in version 1.2.7.
AMD module name is also different from both new and old CommonJS module names, so a separate declaration was created for that as well.

* Add definitions for redux-recycle (#13424)

* Add definitions for redux-recycle

* Fix linter errors

* [jest] add type definition for toHaveBeenLastCalledWith (#13038)

* remove ajv because the package bundles its own types (#13028)

* Updated type definitions to yfiles for HTML 2.0. (#13332)

* Updated type definitions to yFiles for HTML 2.0.

* Updated type definitions to yfiles for HTML 2.0.

* Added contact in yfiles .d.ts header.

* Add redux-batched-actions typings. (#13054)

* Add types for mailgen (#13080)

* Typings for cordova-sqlite-storage (#13081)

* Add flatpickr definitions (#13083)

* Add pouch-redux-middleware typing (#13071)

* Add pouch-redux-middleware typing

* Fix <> in comment

* Add declaration for crc (#13068)

* Updated jquery.dataTables for 1.10.9 (#13099)

Release Notes: https://cdn.datatables.net/1.10.9/

* Moved legacy browser settings to its own data type.
* Added 'aIds' property on legacy settings object for mapping row ids to data indexes.
* Added 'rowIdFn' function to legacy settings object to get a row's id from the row's data.

* chore(lint): change vis typing to external module (#13399)

* Fix cordova-sqlite-storage lint

* Lint `vis`: Remove "I" prefix for namespaces

* Change cordova-sqlite-storage back. Linter was wrong.
2016-12-20 11:55:40 -08:00

73 lines
1.9 KiB
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: 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)[];
resourceBuffer?: Buffer | null;
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;