Files
DefinitelyTyped/enhanced-resolve/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

159 lines
5.7 KiB
TypeScript

// Type definitions for enhanced-resolve v3.0.0
// Project: http://github.com/webpack/enhanced-resolve.git
// Definitions by: e-cloud <https://github.com/e-cloud>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
/// <reference types="tapable" />
import fs = require('fs');
import {
ResolveResult,
LoggingCallbackWrapper,
ResolverRequest,
ResolveContext,
AbstractInputFileSystem
} from './lib/common-types'
import { Dictionary } from './lib/concord'
import Resolver = require('./lib/Resolver');
import Tapable = require('tapable');
declare namespace Resolve {
function sync(path: string, request: string): ResolveResult;
function sync(context: ResolveContext, path: string, request: string): ResolveResult;
function context(path: string, request: string, callback: LoggingCallbackWrapper): void;
function context(context: ResolveContext, path: string, request: string, callback: LoggingCallbackWrapper): void;
namespace context {
function sync(path: string, request: string): ResolveResult;
function sync(context: ResolveContext, path: string, request: string): ResolveResult;
}
function loader(path: string, request: string, callback: LoggingCallbackWrapper): void;
function loader(context: ResolveContext, path: string, request: string, callback: LoggingCallbackWrapper): void;
namespace context {
function sync(path: string, request: string): ResolveResult;
function sync(context: ResolveContext, path: string, request: string): ResolveResult;
}
function create(path: string, request: string, callback: LoggingCallbackWrapper): void;
function create(context: ResolveContext, path: string, request: string, callback: LoggingCallbackWrapper): void;
export namespace create {
function sync(path: string, request: string): ResolveResult;
function sync(context: ResolveContext, path: string, request: string): ResolveResult;
}
export namespace ResolverFactory {
interface ResolverOption {
alias?: AliasItem[] | Dictionary<string>;
aliasFields?: string[];
cachePredicate?: (val: ResolverRequest) => boolean;
descriptionFiles?: string[];
enforceExtension?: boolean;
enforceModuleExtension?: boolean;
extensions: string[];
fileSystem: AbstractInputFileSystem;
mainFields?: string[];
mainFiles?: string[];
moduleExtensions?: string[];
modules?: string[];
plugins?: Tapable.Plugin[];
resolver?: Resolver;
resolveToContext?: boolean;
symlinks?: string[] | boolean;
unsafeCache?: boolean | Dictionary<any>;
useSyncFileSystemCalls?: boolean;
}
interface AliasItem {
alias: string;
name: string;
onlyModule: boolean;
}
function createResolver(options: ResolverOption): Resolver;
}
class NodeJsInputFileSystem {
stat(path: string, callback?: (err: NodeJS.ErrnoException, stats: fs.Stats) => any): void;
readdir(path: string, callback: (err: Error, files: string[]) => void): void
readFile(
filename: string, encoding: string,
callback: (err: NodeJS.ErrnoException, data: string) => void
): void;
readFile(
filename: string, options: {
encoding: string;
flag?: string;
}, callback: (err: NodeJS.ErrnoException, data: string) => void
): void;
readFile(
filename: string, options: {
flag?: string;
}, callback: (err: NodeJS.ErrnoException, data: Buffer) => void
): void;
readFile(filename: string, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void;
readlink(path: string, callback?: (err: NodeJS.ErrnoException, linkString: string) => any): void;
statSync(path: string | Buffer): fs.Stats;
readdirSync(path: string): string[];
readFileSync(filename: string, encoding: string): string;
readFileSync(
filename: string, options: {
encoding: string;
flag?: string;
}
): string;
readFileSync(
filename: string, options?: {
flag?: string;
}
): Buffer;
readlinkSync(path: string | Buffer): string;
}
class CachedInputFileSystem {
fileSystem: AbstractInputFileSystem;
constructor(fileSystem: AbstractInputFileSystem, duration: number);
stat?(path: string, callback: (err: NodeJS.ErrnoException, stats: fs.Stats) => void): void;
readdir?(path: string, callback: (err: NodeJS.ErrnoException, files: string[]) => void): void;
readFile?(path: string, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void;
readJson?(path: string, callback: (err: NodeJS.ErrnoException, data: any) => void): void;
readlink?(path: string, callback: (err: NodeJS.ErrnoException, linkString: string) => void): void;
statSync?(path: string | Buffer): fs.Stats;
readdirSync?(path: string): string[];
readFileSync?(filename: string, options?: { flag?: string; }): Buffer;
readlinkSync?(path: string | Buffer): string;
readJsonSync?(path: string): any;
purge(what?: string | string[]): void;
}
}
declare function Resolve(path: string, request: string, callback: LoggingCallbackWrapper): void;
declare function Resolve(
context: ResolveContext,
path: string,
request: string,
callback: LoggingCallbackWrapper
): void;
export = Resolve;