mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 14:27:04 +00:00
Merge branch 'master' into master
This commit is contained in:
@@ -1,2 +1,7 @@
|
||||
# Auto detect text files and perform LF normalization
|
||||
* text=auto
|
||||
|
||||
# Checkout NPM package files with forced LF lineendings
|
||||
# to prevent git conflicts when running npm commands
|
||||
package.json text eol=lf
|
||||
package-lock.json text eol=lf
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
import * as Glue from "glue";
|
||||
import * as Hapi from "hapi";
|
||||
|
||||
const manifest: Glue.Manifest = {
|
||||
server: {
|
||||
port: 3000
|
||||
},
|
||||
register: {
|
||||
plugins: [
|
||||
{
|
||||
plugin: "./test",
|
||||
routes: {
|
||||
prefix: "test"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Glue.compose(manifest);
|
||||
Vendored
+35
@@ -0,0 +1,35 @@
|
||||
// Type definitions for glue
|
||||
// Project: https://github.com/hapijs/glue
|
||||
// Definitions by: Gareth Parker
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.7
|
||||
|
||||
declare module "glue" {
|
||||
|
||||
import { Server, ServerOptions } from "hapi";
|
||||
|
||||
export interface Options {
|
||||
relativeTo: string;
|
||||
preConnections?: (Server:Server, next:(err:any)=>void ) => void;
|
||||
preRegister?: (Server:Server, next:(err:any)=>void ) => void;
|
||||
}
|
||||
|
||||
interface Plugin {
|
||||
plugin: string | {
|
||||
register:string;
|
||||
options?:any;
|
||||
};
|
||||
options?: any;
|
||||
routes?: any
|
||||
}
|
||||
|
||||
interface Manifest {
|
||||
server: ServerOptions;
|
||||
register?: {
|
||||
plugins: Array<Plugin>
|
||||
}
|
||||
}
|
||||
|
||||
export function compose(manifest: Manifest, options?: Options): Server;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es2017",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"experimentalDecorators": true,
|
||||
"esModuleInterop": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"hapi-glue-test.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
@@ -174,7 +174,7 @@
|
||||
"sourceRepoURL": "https://github.com/MikeMcl/bignumber.js/",
|
||||
"asOfVersion": "5.0.0"
|
||||
},
|
||||
{
|
||||
{
|
||||
"libraryName": "bingmaps",
|
||||
"typingsPackageName": "bingmaps",
|
||||
"sourceRepoURL": "https://github.com/Microsoft/Bing-Maps-V8-TypeScript-Definitions",
|
||||
@@ -234,6 +234,12 @@
|
||||
"sourceRepoURL": "https://github.com/saltyrtc/chunked-dc-js",
|
||||
"asOfVersion": "0.2.2"
|
||||
},
|
||||
{
|
||||
"libraryName": "colors.js (colors)",
|
||||
"typingsPackageName": "colors",
|
||||
"sourceRepoURL": "https://github.com/Marak/colors.js",
|
||||
"asOfVersion": "1.2.1"
|
||||
},
|
||||
{
|
||||
"libraryName": "commander",
|
||||
"typingsPackageName": "commander",
|
||||
|
||||
Vendored
+6
@@ -1,4 +1,6 @@
|
||||
/// <reference types="node" />
|
||||
/// <reference types="lodash" />
|
||||
/// <reference types="benchmark" />
|
||||
|
||||
declare namespace adone {
|
||||
const _null: symbol;
|
||||
@@ -104,4 +106,8 @@ declare namespace adone {
|
||||
export const expect: assertion.I.ExpectFunction;
|
||||
|
||||
export const std: typeof nodestd;
|
||||
|
||||
export const lodash: _.LoDashStatic;
|
||||
|
||||
export const benchmark: typeof tbenchmark;
|
||||
}
|
||||
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
import Benchmark = require("benchmark");
|
||||
|
||||
export { Benchmark };
|
||||
|
||||
export as namespace tbenchmark;
|
||||
Vendored
+38
-26
@@ -1158,37 +1158,35 @@ declare namespace adone {
|
||||
*/
|
||||
function watch(paths: string | string[], options?: I.Watcher.ConstructorOptions): Watcher;
|
||||
|
||||
namespace is {
|
||||
/**
|
||||
* Returns true if the given path refers to a file
|
||||
*/
|
||||
function file(path: string): Promise<boolean>;
|
||||
/**
|
||||
* Returns true if the given path refers to a file
|
||||
*/
|
||||
function isFile(path: string): Promise<boolean>;
|
||||
|
||||
/**
|
||||
* Returns true if the given path refers to a file
|
||||
*/
|
||||
function fileSync(path: string): boolean;
|
||||
/**
|
||||
* Returns true if the given path refers to a file
|
||||
*/
|
||||
function isFileSync(path: string): boolean;
|
||||
|
||||
/**
|
||||
* Returns true if the given path refers to a direcotry
|
||||
*/
|
||||
function directory(path: string): Promise<boolean>;
|
||||
/**
|
||||
* Returns true if the given path refers to a direcotry
|
||||
*/
|
||||
function isDirectory(path: string): Promise<boolean>;
|
||||
|
||||
/**
|
||||
* Returns true if the given path refers to a direcotry
|
||||
*/
|
||||
function directorySync(path: string): boolean;
|
||||
/**
|
||||
* Returns true if the given path refers to a direcotry
|
||||
*/
|
||||
function isDirectorySync(path: string): boolean;
|
||||
|
||||
/**
|
||||
* Returns true if the given path refers to an executable file
|
||||
*/
|
||||
function executable(path: string): Promise<boolean>;
|
||||
/**
|
||||
* Returns true if the given path refers to an executable file
|
||||
*/
|
||||
function isExecutable(path: string): Promise<boolean>;
|
||||
|
||||
/**
|
||||
* Returns true if the given path refers to an executable file
|
||||
*/
|
||||
function executableSync(path: string): boolean;
|
||||
}
|
||||
/**
|
||||
* Returns true if the given path refers to an executable file
|
||||
*/
|
||||
function isExecutableSync(path: string): boolean;
|
||||
|
||||
namespace I.Which {
|
||||
interface Options {
|
||||
@@ -1920,5 +1918,19 @@ declare namespace adone {
|
||||
* Creates a new TailWatcher instance with the given arguments
|
||||
*/
|
||||
function watchTail(filename: string, options?: I.TailWatcher.ConstructorOptions): TailWatcher;
|
||||
|
||||
namespace I {
|
||||
interface WriteFileAtomicOptions {
|
||||
chown?: {
|
||||
gid?: number;
|
||||
uid?: number;
|
||||
};
|
||||
encoding?: string | null;
|
||||
fsync?: boolean;
|
||||
mode?: number;
|
||||
}
|
||||
}
|
||||
|
||||
function writeFileAtomic(filename: string, data: Buffer | string | Uint8Array, options?: I.WriteFileAtomicOptions): Promise<void>;
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+4
@@ -676,5 +676,9 @@ declare namespace adone {
|
||||
export function emitter(obj: any): obj is event.Emitter;
|
||||
|
||||
export function asyncEmitter(obj: any): obj is event.AsyncEmitter;
|
||||
|
||||
export const openbsd: boolean;
|
||||
|
||||
export const aix: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -602,13 +602,12 @@ namespace fsTests {
|
||||
}
|
||||
|
||||
namespace isTests {
|
||||
const { is } = fs;
|
||||
is.file("hello").then((x: boolean) => {});
|
||||
{ const a: boolean = is.fileSync("hello"); }
|
||||
is.directory("hello").then((x: boolean) => {});
|
||||
{ const a: boolean = is.directorySync("hello"); }
|
||||
is.executable("hello").then((x: boolean) => {});
|
||||
{ const a: boolean = is.executableSync("hello"); }
|
||||
fs.isFile("hello").then((x: boolean) => {});
|
||||
{ const a: boolean = fs.isFileSync("hello"); }
|
||||
fs.isDirectory("hello").then((x: boolean) => {});
|
||||
{ const a: boolean = fs.isDirectorySync("hello"); }
|
||||
fs.isExecutable("hello").then((x: boolean) => {});
|
||||
{ const a: boolean = fs.isExecutableSync("hello"); }
|
||||
}
|
||||
|
||||
namespace whichTests {
|
||||
@@ -944,4 +943,17 @@ namespace fsTests {
|
||||
fs.watchTail("file", { separator: /\n/ });
|
||||
fs.watchTail("file", { useWatchFile: true });
|
||||
}
|
||||
|
||||
namespace writeFileAtomicTests {
|
||||
fs.writeFileAtomic("a", "b").then(() => {});
|
||||
fs.writeFileAtomic("a", Buffer.from("b")).then(() => {});
|
||||
fs.writeFileAtomic("a", new Uint8Array(10)).then(() => {});
|
||||
fs.writeFileAtomic("a", "a", {}).then(() => {});
|
||||
fs.writeFileAtomic("a", "a", { chown: {} }).then(() => {});
|
||||
fs.writeFileAtomic("a", "a", { chown: { gid: 0 } }).then(() => {});
|
||||
fs.writeFileAtomic("a", "a", { chown: { uid: 0 } }).then(() => {});
|
||||
fs.writeFileAtomic("a", "a", { encoding: "utf8" }).then(() => {});
|
||||
fs.writeFileAtomic("a", "a", { fsync: false }).then(() => {});
|
||||
fs.writeFileAtomic("a", "a", { mode: 0o666 }).then(() => {});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -336,6 +336,8 @@ namespace isTests {
|
||||
{ const a: boolean = is.freebsd; }
|
||||
{ const a: boolean = is.darwin; }
|
||||
{ const a: boolean = is.sunos; }
|
||||
{ const a: boolean = is.openbsd; }
|
||||
{ const a: boolean = is.aix; }
|
||||
{ const a: boolean = is.uppercase("abc"); }
|
||||
{ const a: boolean = is.lowercase("abc"); }
|
||||
{ const a: boolean = is.digits("012"); }
|
||||
|
||||
@@ -54,4 +54,15 @@ namespace AdoneRootTests {
|
||||
obj = adone.package;
|
||||
{ const a: typeof adone.assertion.assert = adone.assert; }
|
||||
{ const a: typeof adone.assertion.expect = adone.expect; }
|
||||
|
||||
namespace lodashTests {
|
||||
adone.lodash.get({}, "a");
|
||||
adone.lodash.defaults({}, {});
|
||||
adone.lodash.zip([]);
|
||||
}
|
||||
|
||||
namespace benchmarkTests {
|
||||
const b = new adone.benchmark.Benchmark.Suite();
|
||||
b.add(() => {}).add("", () => {}).run();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
"files": [
|
||||
"adone-tests.ts",
|
||||
"adone.d.ts",
|
||||
"benchmark.d.ts",
|
||||
"glosses/archives.d.ts",
|
||||
"glosses/assertion.d.ts",
|
||||
"glosses/collections/array_set.d.ts",
|
||||
|
||||
Vendored
+2
@@ -2,6 +2,7 @@
|
||||
// Project: https://github.com/Atmosphere/atmosphere-javascript
|
||||
// Definitions by: Kai Toedter <https://github.com/toedter>
|
||||
// Fedor Kirpichev <https://github.com/Mory1879>
|
||||
// Jorge Beltran <https://github.com/Scipion>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
// Use this typings in future instead of deprecated 'atmosphere'.
|
||||
@@ -65,6 +66,7 @@ declare namespace Atmosphere {
|
||||
maxReconnectOnClose?: number;
|
||||
enableProtocol?: boolean;
|
||||
pollingInterval?: number;
|
||||
webSocketUrl?: string;
|
||||
|
||||
onError?: (response?:Response) => void;
|
||||
onClose?: (response?:Response) => void;
|
||||
|
||||
Vendored
+1
-1
@@ -90,7 +90,7 @@ export interface AttributeValue {
|
||||
// Context
|
||||
// http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_streams_StreamRecord.html
|
||||
export interface StreamRecord {
|
||||
ApproximateCreationTime?: number;
|
||||
ApproximateCreationDateTime?: number;
|
||||
Keys?: { [key: string]: AttributeValue };
|
||||
NewImage?: { [key: string]: AttributeValue };
|
||||
OldImage?: { [key: string]: AttributeValue };
|
||||
|
||||
Vendored
+20
@@ -1678,6 +1678,17 @@ declare namespace chrome.devtools.inspectedWindow {
|
||||
* Parameter exceptionInfo: An object providing details if an exception occurred while evaluating the expression.
|
||||
*/
|
||||
export function eval<T>(expression: string, callback?: (result: T, exceptionInfo: EvaluationExceptionInfo) => void): void;
|
||||
/**
|
||||
* Evaluates a JavaScript expression in the context of the main frame of the inspected page. The expression must evaluate to a JSON-compliant object, otherwise an exception is thrown. The eval function can report either a DevTools-side error or a JavaScript exception that occurs during evaluation. In either case, the result parameter of the callback is undefined. In the case of a DevTools-side error, the isException parameter is non-null and has isError set to true and code set to an error code. In the case of a JavaScript error, isException is set to true and value is set to the string value of thrown object.
|
||||
* @param expression An expression to evaluate.
|
||||
* @param options The options parameter can contain one or more options.
|
||||
* @param callback A function called when evaluation completes.
|
||||
* If you specify the callback parameter, it should be a function that looks like this:
|
||||
* function(object result, object exceptionInfo) {...};
|
||||
* Parameter result: The result of evaluation.
|
||||
* Parameter exceptionInfo: An object providing details if an exception occurred while evaluating the expression.
|
||||
*/
|
||||
export function eval<T>(expression: string, options: EvalOptions, callback?: (result: T, exceptionInfo: EvaluationExceptionInfo) => void): void;
|
||||
/**
|
||||
* Retrieves the list of resources from the inspected page.
|
||||
* @param callback A function that receives the list of resources when the request completes.
|
||||
@@ -1690,6 +1701,15 @@ declare namespace chrome.devtools.inspectedWindow {
|
||||
export var onResourceAdded: ResourceAddedEvent;
|
||||
/** Fired when a new revision of the resource is committed (e.g. user saves an edited version of the resource in the Developer Tools). */
|
||||
export var onResourceContentCommitted: ResourceContentCommittedEvent;
|
||||
|
||||
export interface EvalOptions {
|
||||
/** If specified, the expression is evaluated on the iframe whose URL matches the one specified. By default, the expression is evaluated in the top frame of the inspected page. */
|
||||
frameURL?: string;
|
||||
/** Evaluate the expression in the context of the content script of the calling extension, provided that the content script is already injected into the inspected page. If not, the expression is not evaluated and the callback is invoked with the exception parameter set to an object that has the isError field set to true and the code field set to E_NOTFOUND. */
|
||||
useContentScriptContext?: boolean;
|
||||
/** Evaluate the expression in the context of a content script of an extension that matches the specified origin. If given, contextSecurityOrigin overrides the 'true' setting on userContentScriptContext. */
|
||||
contextSecurityOrigin?: string;
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////
|
||||
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
import Cleave = require("../");
|
||||
|
||||
// Credit Card Options
|
||||
export type CreditCardType =
|
||||
| "amex"
|
||||
| "dankort"
|
||||
| "diners"
|
||||
| "discover"
|
||||
| "instapayment"
|
||||
| "jcb"
|
||||
| "maestro"
|
||||
| "mastercard"
|
||||
| "uatp"
|
||||
| "unknown"
|
||||
| "unionPay"
|
||||
| "mir"
|
||||
| "visa";
|
||||
|
||||
export type CreditCardTypeChangeHandler = (this: Cleave, type: CreditCardType) => void;
|
||||
@@ -1,19 +1,4 @@
|
||||
// Credit Card Options
|
||||
export type CreditCardType =
|
||||
| "amex"
|
||||
| "dankort"
|
||||
| "diners"
|
||||
| "discover"
|
||||
| "instapayment"
|
||||
| "jcb"
|
||||
| "maestro"
|
||||
| "mastercard"
|
||||
| "uatp"
|
||||
| "unknown"
|
||||
| "unionPay"
|
||||
| "mir"
|
||||
| "visa";
|
||||
export type CreditCardTypeChangeHandler = (owner: HTMLInputElement, type: CreditCardType) => void;
|
||||
import { CreditCardTypeChangeHandler } from "./creditCard";
|
||||
|
||||
export interface CleaveOptions {
|
||||
creditCard?: boolean;
|
||||
@@ -21,7 +21,8 @@
|
||||
"files": [
|
||||
"cleave.js-tests.tsx",
|
||||
"index.d.ts",
|
||||
"options.d.ts",
|
||||
"options/creditCard.d.ts",
|
||||
"options/index.d.ts",
|
||||
"react/index.d.ts"
|
||||
]
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
import colors = require("colors");
|
||||
import { zalgo } from "colors/safe";
|
||||
|
||||
let str: string;
|
||||
|
||||
str = zalgo("");
|
||||
|
||||
colors.enabled = true;
|
||||
|
||||
str = colors.black.underline('test');
|
||||
str = colors.rainbow.black.blue.gray('test');
|
||||
str = colors.random.reset.bgWhite.dim('test');
|
||||
str = colors.random.reset.bgWhite.strip('test');
|
||||
str = 'test'.black.underline;
|
||||
str = 'test'.rainbow.black.blue.gray;
|
||||
str = 'test'.random.reset.bgWhite.dim;
|
||||
str = 'test'.random.reset.bgWhite.dim.stripColors;
|
||||
|
||||
colors.enabled = false;
|
||||
|
||||
str = colors.black.underline('test');
|
||||
Vendored
-133
@@ -1,133 +0,0 @@
|
||||
// Type definitions for Colors.js 1.1
|
||||
// Project: https://github.com/Marak/colors.js
|
||||
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>, Staffan Eketorp <https://github.com/staeke>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export interface Color {
|
||||
(text: string): string;
|
||||
|
||||
strip: Color;
|
||||
stripColors: Color;
|
||||
|
||||
black: Color;
|
||||
red: Color;
|
||||
green: Color;
|
||||
yellow: Color;
|
||||
blue: Color;
|
||||
magenta: Color;
|
||||
cyan: Color;
|
||||
white: Color;
|
||||
gray: Color;
|
||||
grey: Color;
|
||||
|
||||
bgBlack: Color;
|
||||
bgRed: Color;
|
||||
bgGreen: Color;
|
||||
bgYellow: Color;
|
||||
bgBlue: Color;
|
||||
bgMagenta: Color;
|
||||
bgCyan: Color;
|
||||
bgWhite: Color;
|
||||
|
||||
reset: Color;
|
||||
bold: Color;
|
||||
dim: Color;
|
||||
italic: Color;
|
||||
underline: Color;
|
||||
inverse: Color;
|
||||
hidden: Color;
|
||||
strikethrough: Color;
|
||||
|
||||
rainbow: Color;
|
||||
zebra: Color;
|
||||
america: Color;
|
||||
trap: Color;
|
||||
random: Color;
|
||||
zalgo: Color;
|
||||
}
|
||||
|
||||
export function setTheme(theme: any): void;
|
||||
|
||||
export let enabled: boolean;
|
||||
|
||||
export const strip: Color;
|
||||
export const stripColors: Color;
|
||||
|
||||
export const black: Color;
|
||||
export const red: Color;
|
||||
export const green: Color;
|
||||
export const yellow: Color;
|
||||
export const blue: Color;
|
||||
export const magenta: Color;
|
||||
export const cyan: Color;
|
||||
export const white: Color;
|
||||
export const gray: Color;
|
||||
export const grey: Color;
|
||||
|
||||
export const bgBlack: Color;
|
||||
export const bgRed: Color;
|
||||
export const bgGreen: Color;
|
||||
export const bgYellow: Color;
|
||||
export const bgBlue: Color;
|
||||
export const bgMagenta: Color;
|
||||
export const bgCyan: Color;
|
||||
export const bgWhite: Color;
|
||||
|
||||
export const reset: Color;
|
||||
export const bold: Color;
|
||||
export const dim: Color;
|
||||
export const italic: Color;
|
||||
export const underline: Color;
|
||||
export const inverse: Color;
|
||||
export const hidden: Color;
|
||||
export const strikethrough: Color;
|
||||
|
||||
export const rainbow: Color;
|
||||
export const zebra: Color;
|
||||
export const america: Color;
|
||||
export const trap: Color;
|
||||
export const random: Color;
|
||||
export const zalgo: Color;
|
||||
|
||||
declare global {
|
||||
interface String {
|
||||
strip: string;
|
||||
stripColors: string;
|
||||
|
||||
black: string;
|
||||
red: string;
|
||||
green: string;
|
||||
yellow: string;
|
||||
blue: string;
|
||||
magenta: string;
|
||||
cyan: string;
|
||||
white: string;
|
||||
gray: string;
|
||||
grey: string;
|
||||
|
||||
bgBlack: string;
|
||||
bgRed: string;
|
||||
bgGreen: string;
|
||||
bgYellow: string;
|
||||
bgBlue: string;
|
||||
bgMagenta: string;
|
||||
bgCyan: string;
|
||||
bgWhite: string;
|
||||
|
||||
reset: string;
|
||||
bold: string;
|
||||
dim: string;
|
||||
italic: string;
|
||||
underline: string;
|
||||
inverse: string;
|
||||
hidden: string;
|
||||
strikethrough: string;
|
||||
|
||||
rainbow: string;
|
||||
zebra: string;
|
||||
america: string;
|
||||
trap: string;
|
||||
random: string;
|
||||
zalgo: string;
|
||||
}
|
||||
}
|
||||
Vendored
-40
@@ -1,40 +0,0 @@
|
||||
export const enabled: boolean;
|
||||
|
||||
export function strip(str: string): string;
|
||||
export function stripColors(str: string): string;
|
||||
|
||||
export function black(str: string): string;
|
||||
export function red(str: string): string;
|
||||
export function green(str: string): string;
|
||||
export function yellow(str: string): string;
|
||||
export function blue(str: string): string;
|
||||
export function magenta(str: string): string;
|
||||
export function cyan(str: string): string;
|
||||
export function white(str: string): string;
|
||||
export function gray(str: string): string;
|
||||
export function grey(str: string): string;
|
||||
|
||||
export function bgBlack(str: string): string;
|
||||
export function bgRed(str: string): string;
|
||||
export function bgGreen(str: string): string;
|
||||
export function bgYellow(str: string): string;
|
||||
export function bgBlue(str: string): string;
|
||||
export function bgMagenta(str: string): string;
|
||||
export function bgCyan(str: string): string;
|
||||
export function bgWhite(str: string): string;
|
||||
|
||||
export function reset(str: string): string;
|
||||
export function bold(str: string): string;
|
||||
export function dim(str: string): string;
|
||||
export function italic(str: string): string;
|
||||
export function underline(str: string): string;
|
||||
export function inverse(str: string): string;
|
||||
export function hidden(str: string): string;
|
||||
export function strikethrough(str: string): string;
|
||||
|
||||
export function rainbow(str: string): string;
|
||||
export function zebra(str: string): string;
|
||||
export function america(str: string): string;
|
||||
export function trap(str: string): string;
|
||||
export function random(str: string): string;
|
||||
export function zalgo(str: string): string;
|
||||
@@ -0,0 +1,41 @@
|
||||
import cosmiconfig = require("cosmiconfig");
|
||||
|
||||
const asyncExplorer = cosmiconfig("yourModuleName", {
|
||||
packageProp: "yourModuleName",
|
||||
rc: ".yourModuleNamerc",
|
||||
js: "yourModuleName.config.js",
|
||||
rcStrictJson: false,
|
||||
rcExtensions: false,
|
||||
stopDir: "someDir",
|
||||
cache: true,
|
||||
sync: false,
|
||||
transform: ({ config, filePath }) => ({ config, filePath }),
|
||||
format: "js"
|
||||
});
|
||||
|
||||
Promise.all([
|
||||
asyncExplorer.load(),
|
||||
asyncExplorer.load("start/search/here"),
|
||||
asyncExplorer.load(null, "load/this/file.json")
|
||||
]).then(result => result);
|
||||
|
||||
asyncExplorer.load().then(({ config, filePath }) => ({ config, filePath }));
|
||||
|
||||
asyncExplorer.clearFileCache();
|
||||
asyncExplorer.clearDirectoryCache();
|
||||
asyncExplorer.clearCaches();
|
||||
|
||||
const syncExplorer = cosmiconfig("yourModuleName", {
|
||||
packageProp: "yourModuleName",
|
||||
rc: ".yourModuleNamerc",
|
||||
js: "yourModuleName.config.js",
|
||||
rcStrictJson: false,
|
||||
rcExtensions: false,
|
||||
stopDir: "someDir",
|
||||
cache: true,
|
||||
sync: true,
|
||||
transform: ({ config, filePath }) => ({ config, filePath }),
|
||||
format: "js"
|
||||
});
|
||||
|
||||
const { config, filePath } = syncExplorer.load();
|
||||
Vendored
+63
@@ -0,0 +1,63 @@
|
||||
// Type definitions for cosmiconfig 4.0
|
||||
// Project: https://github.com/davidtheclark/cosmiconfig
|
||||
// Definitions by: ozum <https://github.com/ozum>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
interface Result {
|
||||
config: object;
|
||||
filePath: string;
|
||||
}
|
||||
|
||||
interface Options {
|
||||
packageProp?: string | false;
|
||||
rc?: string | false;
|
||||
js?: string | false;
|
||||
rcStrictJson?: boolean;
|
||||
rcExtensions?: boolean;
|
||||
stopDir?: string;
|
||||
cache?: boolean;
|
||||
transform?: (result: Result) => Promise<Result> | Result;
|
||||
configPath?: string;
|
||||
format?: "json" | "yaml" | "js";
|
||||
}
|
||||
|
||||
// Default is false and makes load() method async
|
||||
interface AsyncOptions extends Options {
|
||||
sync?: false;
|
||||
}
|
||||
|
||||
// Makes load() method sync
|
||||
interface SyncOptions extends Options {
|
||||
sync: true;
|
||||
}
|
||||
|
||||
interface Explorer {
|
||||
clearFileCache(): void;
|
||||
clearDirectoryCache(): void;
|
||||
clearCaches(): void;
|
||||
}
|
||||
|
||||
interface AsyncExplorer extends Explorer {
|
||||
// You should provide either searchPath or configPath for load method. To disallow both, overloaded definitions added.
|
||||
load(searchPath?: string): Promise<Result>;
|
||||
load(searchPath: null | undefined, configPath?: string): Promise<Result>;
|
||||
}
|
||||
|
||||
interface SyncExplorer extends Explorer {
|
||||
// You should provide either searchPath or configPath for load method. To disallow both, overloaded definitions added.
|
||||
load(searchPath?: string): Result;
|
||||
load(searchPath: null | undefined, configPath?: string): Result;
|
||||
}
|
||||
|
||||
declare function cosmiconfig(
|
||||
moduleName: string,
|
||||
options: SyncOptions
|
||||
): SyncExplorer;
|
||||
|
||||
declare function cosmiconfig(
|
||||
moduleName: string,
|
||||
options?: AsyncOptions
|
||||
): AsyncExplorer;
|
||||
|
||||
export = cosmiconfig;
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": ["es6"],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": ["../"],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": ["index.d.ts", "cosmiconfig-tests.ts"]
|
||||
}
|
||||
@@ -395,6 +395,9 @@ constructedProjection = constructedProjection.translate([480, 250]);
|
||||
const center: [number, number] = constructedProjection.center();
|
||||
constructedProjection = constructedProjection.center([0, 0]);
|
||||
|
||||
const angle = constructedProjection.angle();
|
||||
constructedProjection = constructedProjection.angle(45);
|
||||
|
||||
const rotate: [number, number, number] = constructedProjection.rotate();
|
||||
constructedProjection = constructedProjection.rotate([0, 0]);
|
||||
constructedProjection = constructedProjection.rotate([0, 0, 0]);
|
||||
|
||||
Vendored
+11
-3
@@ -1,10 +1,10 @@
|
||||
// Type definitions for D3JS d3-geo module 1.9
|
||||
// Type definitions for D3JS d3-geo module 1.10
|
||||
// Project: https://github.com/d3/d3-geo/
|
||||
// Definitions by: Hugues Stefanski <https://github.com/Ledragon>, Tom Wanzek <https://github.com/tomwanzek>, Alex Ford <https://github.com/gustavderdrache>, Boris Yankov <https://github.com/borisyankov>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
// Last module patch version validated against: 1.9.0
|
||||
// Last module patch version validated against: 1.10.0
|
||||
|
||||
import * as GeoJSON from 'geojson';
|
||||
|
||||
@@ -887,7 +887,15 @@ export interface GeoProjection extends GeoStreamWrapper {
|
||||
* @param precision A numeric value in pixels to use as the threshold for the projection’s adaptive resampling.
|
||||
*/
|
||||
precision(precision: number): this;
|
||||
|
||||
/**
|
||||
* Returns the projection’s current angle, which defaults to 0°.
|
||||
*/
|
||||
angle(): number;
|
||||
/**
|
||||
* Sets the projection’s post-projection planar rotation angle to the specified angle in degrees and returns the projection.
|
||||
* @param angle The new rotation angle of the projection.
|
||||
*/
|
||||
angle(angle: number): this;
|
||||
/**
|
||||
* Returns the current rotation [lambda, phi, gamma] specifying the rotation angles in degrees about each spherical axis.
|
||||
* (These correspond to yaw, pitch and roll.) which defaults [0, 0, 0].
|
||||
|
||||
+33
-25
@@ -1,39 +1,47 @@
|
||||
import del = require("del");
|
||||
import del = require('del');
|
||||
|
||||
let paths = ["build", "dist/**/*.js"];
|
||||
let paths = ['build', 'dist/**/*.js'];
|
||||
|
||||
del(["tmp/*.js", "!tmp/unicorn.js"]);
|
||||
del(["tmp/*.js", "!tmp/unicorn.js"], {force: true});
|
||||
del(["tmp/*.js", "!tmp/unicorn.js"], {dryRun: true});
|
||||
del(["tmp/*.js", "!tmp/unicorn.js"], {concurrency: 20});
|
||||
del(["tmp/*.js", "!tmp/unicorn.js"], {cwd: ''});
|
||||
del(['tmp/*.js', '!tmp/unicorn.js']);
|
||||
del(['tmp/*.js', '!tmp/unicorn.js'], { force: true });
|
||||
del(['tmp/*.js', '!tmp/unicorn.js'], { dryRun: true });
|
||||
del(['tmp/*.js', '!tmp/unicorn.js'], { concurrency: 20 });
|
||||
del(['tmp/*.js', '!tmp/unicorn.js'], { cwd: '' });
|
||||
|
||||
del(["tmp/*.js", "!tmp/unicorn.js"]).then((paths: string[]) => {
|
||||
del(['tmp/*.js', '!tmp/unicorn.js']).then((paths: string[]) => {
|
||||
console.log('Deleted files/folders:\n', paths.join('\n'));
|
||||
});
|
||||
|
||||
del(["tmp/*.js", "!tmp/unicorn.js"], {force: true}).then((paths: string[]) => {
|
||||
del(['tmp/*.js', '!tmp/unicorn.js'], { force: true }).then(
|
||||
(paths: string[]) => {
|
||||
console.log('Deleted files/folders:\n', paths.join('\n'));
|
||||
}
|
||||
);
|
||||
|
||||
del('tmp/*.js');
|
||||
del('tmp/*.js', { force: true });
|
||||
del('tmp/*.js', { dryRun: true });
|
||||
del('tmp/*.js', { concurrency: 20 });
|
||||
del('tmp/*.js', { cwd: '' });
|
||||
del('tmp/*.js').then((paths: string[]) => {
|
||||
console.log('Deleted files/folders:\n', paths.join('\n'));
|
||||
});
|
||||
|
||||
del("tmp/*.js");
|
||||
del("tmp/*.js", {force: true});
|
||||
del("tmp/*.js", {dryRun: true});
|
||||
del("tmp/*.js", {concurrency: 20});
|
||||
del("tmp/*.js", {cwd: ''});
|
||||
del("tmp/*.js").then((paths: string[]) => {
|
||||
del('tmp/*.js', { force: true }).then((paths: string[]) => {
|
||||
console.log('Deleted files/folders:\n', paths.join('\n'));
|
||||
});
|
||||
|
||||
del("tmp/*.js", {force: true}).then((paths: string[]) => {
|
||||
console.log('Deleted files/folders:\n', paths.join('\n'));
|
||||
});
|
||||
paths = del.sync(['tmp/*.js', '!tmp/unicorn.js']);
|
||||
paths = del.sync(['tmp/*.js', '!tmp/unicorn.js'], { force: true });
|
||||
|
||||
paths = del.sync(["tmp/*.js", "!tmp/unicorn.js"]);
|
||||
paths = del.sync(["tmp/*.js", "!tmp/unicorn.js"], {force: true});
|
||||
paths = del.sync('tmp/*.js');
|
||||
paths = del.sync('tmp/*.js', { force: true });
|
||||
paths = del.sync('tmp/*.js', { dryRun: true });
|
||||
paths = del.sync('tmp/*.js', { concurrency: 20 });
|
||||
paths = del.sync('tmp/*.js', { cwd: '' });
|
||||
|
||||
paths = del.sync("tmp/*.js");
|
||||
paths = del.sync("tmp/*.js", {force: true});
|
||||
paths = del.sync("tmp/*.js", {dryRun: true});
|
||||
paths = del.sync("tmp/*.js", {concurrency: 20});
|
||||
paths = del.sync("tmp/*.js", {cwd: ''});
|
||||
const immutable: ReadonlyArray<string> = ['tmp/*.js', '!tmp/unicorn.js'];
|
||||
const mutable = del(immutable);
|
||||
const mutablePaths = del.sync(immutable);
|
||||
mutable.then(paths => paths.push('test'));
|
||||
mutablePaths.push('test');
|
||||
|
||||
Vendored
+10
-3
@@ -3,14 +3,21 @@
|
||||
// Definitions by: Asana <https://asana.com>
|
||||
// Aya Morisawa <https://github.com/AyaMorisawa>
|
||||
// BendingBender <https://github.com/BendingBender>
|
||||
// Jason Dreyzehner <https://github.com/bitjson>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import glob = require("glob");
|
||||
import glob = require('glob');
|
||||
|
||||
declare function del(patterns: string | string[], options?: del.Options): Promise<string[]>;
|
||||
declare function del(
|
||||
patterns: string | ReadonlyArray<string>,
|
||||
options?: del.Options
|
||||
): Promise<string[]>;
|
||||
|
||||
declare namespace del {
|
||||
function sync(patterns: string | string[], options?: Options): string[];
|
||||
function sync(
|
||||
patterns: string | ReadonlyArray<string>,
|
||||
options?: Options
|
||||
): string[];
|
||||
|
||||
interface Options extends glob.IOptions {
|
||||
force?: boolean;
|
||||
|
||||
@@ -22,7 +22,8 @@ import {
|
||||
DraftEntityMutability,
|
||||
DraftEntityType,
|
||||
convertFromHTML,
|
||||
convertToRaw
|
||||
convertToRaw,
|
||||
CompositeDecorator,
|
||||
} from 'draft-js';
|
||||
|
||||
const SPLIT_HEADER_BLOCK = 'split-header-block';
|
||||
@@ -38,6 +39,14 @@ export const KEYCODES: Record<KeyName, KeyCode> = {
|
||||
|
||||
type SyntheticKeyboardEvent = React.KeyboardEvent<{}>;
|
||||
|
||||
const HANDLE_REGEX = /\@[\w]+/g;
|
||||
|
||||
class HandleSpan extends React.Component {
|
||||
render() {
|
||||
return <span>{this.props.children}</span>
|
||||
}
|
||||
}
|
||||
|
||||
class RichEditorExample extends React.Component<{}, { editorState: EditorState }> {
|
||||
constructor() {
|
||||
super({});
|
||||
@@ -51,8 +60,22 @@ class RichEditorExample extends React.Component<{}, { editorState: EditorState }
|
||||
blocksFromHTML.contentBlocks,
|
||||
blocksFromHTML.entityMap,
|
||||
);
|
||||
|
||||
this.state = { editorState: EditorState.createWithContent(state) };
|
||||
const decorator = new CompositeDecorator([{
|
||||
strategy: (
|
||||
block: ContentBlock,
|
||||
callback: (start: number, end: number) => void,
|
||||
contentState: ContentState
|
||||
) => {
|
||||
const text = block.getText();
|
||||
let matchArr, start;
|
||||
while ((matchArr = HANDLE_REGEX.exec(text)) !== null) {
|
||||
start = matchArr.index;
|
||||
callback(start, start + matchArr[0].length);
|
||||
}
|
||||
},
|
||||
component: HandleSpan,
|
||||
}]);
|
||||
this.state = { editorState: EditorState.createWithContent(state, decorator) };
|
||||
}
|
||||
|
||||
onChange: (editorState: EditorState) => void = (editorState: EditorState) => this.setState({ editorState });
|
||||
|
||||
Vendored
+4
-3
@@ -1,4 +1,4 @@
|
||||
// Type definitions for Draft.js v0.10.4
|
||||
// Type definitions for Draft.js v0.10.5
|
||||
// Project: https://facebook.github.io/draft-js/
|
||||
// Definitions by: Dmitry Rogozhny <https://github.com/dmitryrogozhny>
|
||||
// Eelco Lempsink <https://github.com/eelco>
|
||||
@@ -7,6 +7,7 @@
|
||||
// Michael Wu <https://github.com/michael-yx-wu>
|
||||
// Willis Plummer <https://github.com/willisplummer>
|
||||
// Santiago Vilar <https://github.com/smvilar>
|
||||
// Ulf Schwekendiek <https://github.com/sulf>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.6
|
||||
|
||||
@@ -398,7 +399,7 @@ declare namespace Draft {
|
||||
/**
|
||||
* Given a `ContentBlock`, return an immutable List of decorator keys.
|
||||
*/
|
||||
getDecorations(block: ContentBlock): Immutable.List<string>;
|
||||
getDecorations(block: ContentBlock, contentState: ContentState): Immutable.List<string>;
|
||||
|
||||
/**
|
||||
* Given a decorator key, return the component to use when rendering
|
||||
@@ -456,7 +457,7 @@ declare namespace Draft {
|
||||
class CompositeDraftDecorator {
|
||||
constructor(decorators: Array<DraftDecorator>);
|
||||
|
||||
getDecorations(block: ContentBlock): Immutable.List<string>;
|
||||
getDecorations(block: ContentBlock, contentState: ContentState): Immutable.List<string>;
|
||||
getComponentForKey(key: string): Function;
|
||||
getPropsForKey(key: string): Object;
|
||||
}
|
||||
|
||||
Vendored
+7
-7
@@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* Dynamsoft WebTwain PDF Addon
|
||||
* Based on Dynamsoft WebTwain JavaScript Intellisense
|
||||
* Product: Dynamsoft Web Twain
|
||||
* Web Site: http://www.dynamsoft.com
|
||||
*
|
||||
@@ -25,7 +25,7 @@ interface PDF {
|
||||
* The function to call when the download succeeds. Please refer to the function prototype OnSuccess.
|
||||
* @param {function} optionalAsyncFailureFunc optional.
|
||||
* The function to call when the download fails. Please refer to the function prototype OnFailure.
|
||||
* @return {bool}
|
||||
* @return {boolean}
|
||||
*/
|
||||
Download(remoteFile: string,
|
||||
optionalAsyncSuccessFunc?: () => void,
|
||||
@@ -35,7 +35,7 @@ interface PDF {
|
||||
* Input the password to decrypt PDF files using PDF Rasterizer add-on.
|
||||
* @method Dynamsoft.WebTwain#SetPassword
|
||||
* @param {string} password Specifies the PDF password.
|
||||
* @return {bool}
|
||||
* @return {boolean}
|
||||
*/
|
||||
SetPassword(password: string): boolean;
|
||||
|
||||
@@ -43,7 +43,7 @@ interface PDF {
|
||||
* Set the image convert mode for PDF Rasterizer in Dynamic Web TWAIN.
|
||||
* @method Dynamsoft.WebTwain#SetConvertMode
|
||||
* @param {EnumDWT_ConverMode} convertMode Specifies the image convert mode.
|
||||
* @return {bool}
|
||||
* @return {boolean}
|
||||
*/
|
||||
SetConvertMode(convertMode: EnumDWT_ConverMode): boolean;
|
||||
|
||||
@@ -51,7 +51,7 @@ interface PDF {
|
||||
* Set the output resolution for the PDF Rasterizer in Dynamic Web TWAIN.
|
||||
* @method Dynamsoft.WebTwain#ReadRect
|
||||
* @param {float} fResolution Specifies the resolution for convert image from PDF file.
|
||||
* @return {bool}
|
||||
* @return {boolean}
|
||||
*/
|
||||
SetResolution(fResolution: number): boolean;
|
||||
|
||||
@@ -59,7 +59,7 @@ interface PDF {
|
||||
* Judges whether the local PDF is text-based or not.
|
||||
* @method Dynamsoft.WebTwain#ReadRect
|
||||
* @param {string} localFile specifies the local path of the target PDF.
|
||||
* @return {bool}
|
||||
* @return {boolean}
|
||||
*/
|
||||
IsTextBasedPDF(localFile: string): boolean;
|
||||
}
|
||||
@@ -69,5 +69,5 @@ interface WebTwainAddon {
|
||||
}
|
||||
|
||||
interface WebTwain {
|
||||
Addon: WebTwainAddon;
|
||||
Addon: WebTwainAddon;
|
||||
}
|
||||
|
||||
Vendored
+1947
-1731
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,4 @@
|
||||
import * as assert from "assert";
|
||||
import * as etherUtil from "ethereumjs-util";
|
||||
|
||||
assert.ok(etherUtil.isValidAddress("0x0bfe6d9a4d4a73857db6fac276669ba45ee69b48"));
|
||||
Vendored
+83
@@ -0,0 +1,83 @@
|
||||
// Type definitions for ethereumjs-util 5.1
|
||||
// Project: https://github.com/ethereumjs/ethereumjs-util#readme
|
||||
// Definitions by: Juan J. Jimenez-Anca <https://github.com/cortopy>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
// TODO: import types for [`BN`](https://github.com/indutny/bn.js)
|
||||
// TODO: MAX_INTEGER as type of BN
|
||||
// TODO: import types for [`rlp`](https://github.com/ethereumjs/rlp)
|
||||
// TODO: import types for [`secp256k1`](https://github.com/cryptocoinjs/secp256k1-node/)
|
||||
|
||||
export const SHA3_NULL_S: string;
|
||||
|
||||
export const SHA3_RLP_ARRAY_S: string;
|
||||
|
||||
export const SHA3_RLP_S: string;
|
||||
|
||||
export function addHexPrefix(str: string): string;
|
||||
|
||||
export function arrayContainsArray(superset: any, subset: any, some: any): any;
|
||||
|
||||
export function baToJSON(ba: Buffer | string[]): Buffer | string[];
|
||||
|
||||
export function bufferToHex(buf: Buffer): string;
|
||||
|
||||
export function bufferToInt(buf: Buffer): string;
|
||||
|
||||
export function defineProperties(self: {[k: string]: any}, fields: string[], data: {[k: string]: any}): {[k: string]: any};
|
||||
|
||||
export function ecrecover(msgHash: Buffer, v: number, r: Buffer, s: Buffer): Buffer;
|
||||
|
||||
export function ecsign(msgHash: Buffer, privateKey: Buffer): {[k: string]: any};
|
||||
|
||||
export function fromRpcSig(sig: string): {[k: string]: any};
|
||||
|
||||
export function fromSigned(num: Buffer): any;
|
||||
|
||||
export function generateAddress(from: Buffer, nonce: Buffer): Buffer;
|
||||
|
||||
export function hashPersonalMessage(message: string): Buffer;
|
||||
|
||||
export function importPublic(publicKey: Buffer): Buffer;
|
||||
|
||||
export function isValidAddress(address: string): boolean;
|
||||
|
||||
export function isValidChecksumAddress(address: Buffer): boolean;
|
||||
|
||||
export function isValidPrivate(privateKey: Buffer): boolean;
|
||||
|
||||
export function isValidPublic(publicKey: Buffer, sanitize?: boolean): any;
|
||||
|
||||
export function isValidSignature(v: Buffer, r: Buffer, s: Buffer, homestead?: boolean): boolean;
|
||||
|
||||
export function privateToAddress(privateKey: Buffer): Buffer;
|
||||
|
||||
export function privateToPublic(privateKey: Buffer): Buffer;
|
||||
|
||||
export function pubToAddress(pubKey: Buffer, sanitize: boolean): Buffer;
|
||||
|
||||
export function ripemd160(a: Buffer | any[] | string | number, padded: boolean): Buffer;
|
||||
|
||||
export function rlphash(a: Buffer | any[] | string | number): Buffer;
|
||||
|
||||
export function setLengthLeft(msg: Buffer | any[], length: number, right?: boolean): Buffer | any[];
|
||||
|
||||
export function setLengthRight(msg: Buffer | any[], length: number): Buffer | any[];
|
||||
|
||||
export function sha256(a: Buffer | any[] | string | number): Buffer;
|
||||
|
||||
export function sha3(a: Buffer | any[] | string | number, bits?: number): Buffer;
|
||||
|
||||
export function toBuffer(v: any): Buffer;
|
||||
|
||||
export function toChecksumAddress(address: string): string;
|
||||
|
||||
export function toRpcSig(v: number, r: Buffer, s: Buffer): string;
|
||||
|
||||
export function toUnsigned(num: any): Buffer;
|
||||
|
||||
export function unpad<T extends Buffer | any[] | string>(a: T): T;
|
||||
|
||||
export function zeros(bytes: number): Buffer;
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": false,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"ethereumjs-util-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
import * as ExecutionEnvironment from 'exenv';
|
||||
|
||||
JSON.stringify(ExecutionEnvironment.canUseDOM);
|
||||
JSON.stringify(ExecutionEnvironment.canUseEventListeners);
|
||||
JSON.stringify(ExecutionEnvironment.canUseViewport);
|
||||
JSON.stringify(ExecutionEnvironment.canUseWorkers);
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
// Type definitions for exenv 1.2
|
||||
// Project: https://github.com/JedWatson/exenv
|
||||
// Definitions by: Christian Chown <https://github.com/christianchown>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.6
|
||||
|
||||
export const canUseDOM: boolean;
|
||||
export const canUseEventListeners: boolean;
|
||||
export const canUseViewport: boolean;
|
||||
export const canUseWorkers: boolean;
|
||||
@@ -2,7 +2,7 @@
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es5"
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
@@ -18,7 +18,6 @@
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"colors-tests.ts",
|
||||
"safe.d.ts"
|
||||
"exenv-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
@@ -14,10 +14,15 @@
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"paths": {
|
||||
"uglify-js": [
|
||||
"uglify-js/v2"
|
||||
]
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"express-minify-tests.ts"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -10,7 +10,7 @@ type FindRootCheckFn = (dir: string) => boolean;
|
||||
/**
|
||||
* Returns the path for the nearest directory to startingPath containing a package.json file. If a check function is
|
||||
* provided, then this will return the nearest directory for which the function returns true.
|
||||
* @param startingPath The path to start searching form, e.g. __dirname
|
||||
* @param startingPath The path to start searching from, e.g. __dirname
|
||||
* @param check The check predicate
|
||||
* @throws {Error} if package.json cannot be found or if the function never returns true
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
import FNV = require('fnv-lite');
|
||||
|
||||
let result: string;
|
||||
result = FNV.hex('');
|
||||
result = FNV.base64('');
|
||||
result = FNV.base64Url('');
|
||||
result = FNV.base36('');
|
||||
|
||||
result = FNV.hex([1, 2, 3]);
|
||||
result = FNV.base64([1, 2, 3]);
|
||||
result = FNV.base64Url([1, 2, 3]);
|
||||
result = FNV.base36([1, 2, 3]);
|
||||
|
||||
const fnv = new FNV();
|
||||
fnv.update([1, 2, 3]).update("abc");
|
||||
result = fnv.digest('hex');
|
||||
result = fnv.digest('base36');
|
||||
result = fnv.digest('base64');
|
||||
result = fnv.digest('base64Url');
|
||||
const resultArray: number[] = fnv.digest();
|
||||
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
// Type definitions for fnv-lite 1.2
|
||||
// Project: https://github.com/casetext/fnv-lite
|
||||
// Definitions by: MarcinD <https://github.com/marcind>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
type Input = string | ArrayLike<number>;
|
||||
|
||||
declare class FNV {
|
||||
static hex(input: Input): string;
|
||||
static base64(input: Input): string;
|
||||
static base64Url(input: Input): string;
|
||||
static base36(input: Input): string;
|
||||
|
||||
update(input: Input): this;
|
||||
digest(): number[];
|
||||
digest(type: "hex" | "base36" | "base64" | "base64Url"): string;
|
||||
}
|
||||
|
||||
export = FNV;
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"fnv-lite-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
+6
@@ -56,6 +56,11 @@ export class GraphQLError extends Error {
|
||||
* The original error thrown from a field resolver during execution.
|
||||
*/
|
||||
originalError?: Error;
|
||||
|
||||
/**
|
||||
* Extension fields to add to the formatted error.
|
||||
*/
|
||||
extensions?: { [key: string]: any } | undefined;
|
||||
|
||||
constructor(
|
||||
message: string,
|
||||
@@ -64,5 +69,6 @@ export class GraphQLError extends Error {
|
||||
positions?: number[],
|
||||
path?: Array<string | number>,
|
||||
originalError?: Error,
|
||||
extensions?: { [key: string]: any },
|
||||
);
|
||||
}
|
||||
|
||||
+4
-1
@@ -1,5 +1,7 @@
|
||||
import { IntrospectionQuery } from './introspectionQuery';
|
||||
import { GraphQLSchema } from '../type/schema';
|
||||
import { GraphQLSchema, GraphQLSchemaValidationOptions } from '../type/schema';
|
||||
|
||||
interface Options extends GraphQLSchemaValidationOptions {}
|
||||
|
||||
/**
|
||||
* Build a GraphQLSchema for use by client tools.
|
||||
@@ -12,4 +14,5 @@ import { GraphQLSchema } from '../type/schema';
|
||||
*/
|
||||
export function buildClientSchema(
|
||||
introspection: IntrospectionQuery,
|
||||
options?: Options,
|
||||
): GraphQLSchema;
|
||||
|
||||
@@ -14,10 +14,13 @@
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"paths": {
|
||||
"uglify-js": ["uglify-js/v2"]
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"gulp-filter-tests.ts"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+2
@@ -2,6 +2,8 @@
|
||||
// Project: https://www.npmjs.com/package/gulp-html-replace
|
||||
// Definitions by: Peter Juras <https://github.com/peterjuras>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
|
||||
|
||||
Vendored
+1
@@ -2,6 +2,7 @@
|
||||
// Project: https://github.com/jonschlinkert/gulp-htmlmin
|
||||
// Definitions by: Tanguy Krotoff <https://github.com/tkrotoff>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
|
||||
@@ -14,10 +14,15 @@
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"paths": {
|
||||
"uglify-js": [
|
||||
"uglify-js/v2"
|
||||
]
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"gulp-rev-replace-tests.ts"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,11 +14,16 @@
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"paths": {
|
||||
"uglify-js": [
|
||||
"uglify-js/v2"
|
||||
]
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"composer.d.ts",
|
||||
"gulp-uglify-tests.ts"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,10 +14,13 @@
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"paths": {
|
||||
"uglify-js": ["uglify-js/v2"]
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"gulp-useref-tests.ts"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
@@ -3,6 +3,7 @@
|
||||
// Definitions by: Tanguy Krotoff <https://github.com/tkrotoff>
|
||||
// Riku <https://github.com/rikuayanokozy>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
import * as UglifyJS from 'uglify-js';
|
||||
import * as CleanCSS from 'clean-css';
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
"html-minifier": [
|
||||
"html-minifier/v1"
|
||||
],
|
||||
"uglify-js": [
|
||||
"uglify-js/v2"
|
||||
],
|
||||
"html-minifier/*": [
|
||||
"html-minifier/v1/*"
|
||||
]
|
||||
@@ -28,4 +31,4 @@
|
||||
"index.d.ts",
|
||||
"html-minifier-tests.ts"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+10
-3
@@ -11,6 +11,8 @@
|
||||
// Jamie Mason <https://github.com/JamieMason>
|
||||
// Douglas Duteil <https://github.com/douglasduteil>
|
||||
// Ahn <https://github.com/AhnpGit>
|
||||
// Josh Goldberg <https://github.com/joshuakgoldberg>
|
||||
// Bradley Ayers <https://github.com/bradleyayers>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
@@ -201,6 +203,10 @@ declare namespace jest {
|
||||
|
||||
type Lifecycle = (fn: ProvidesCallback, timeout?: number) => any;
|
||||
|
||||
interface FunctionLike {
|
||||
readonly name: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a test closure
|
||||
*/
|
||||
@@ -222,7 +228,8 @@ declare namespace jest {
|
||||
}
|
||||
|
||||
interface Describe {
|
||||
(name: string, fn: EmptyFunction): void;
|
||||
// tslint:disable-next-line ban-types
|
||||
(name: number | string | Function | FunctionLike, fn: EmptyFunction): void;
|
||||
only: Describe;
|
||||
skip: Describe;
|
||||
}
|
||||
@@ -230,8 +237,8 @@ declare namespace jest {
|
||||
interface MatcherUtils {
|
||||
readonly isNot: boolean;
|
||||
utils: {
|
||||
readonly EXPECTED_COLOR: string;
|
||||
readonly RECEIVED_COLOR: string;
|
||||
readonly EXPECTED_COLOR: (text: string) => string;
|
||||
readonly RECEIVED_COLOR: (text: string) => string;
|
||||
ensureActualIsNumber(actual: any, matcherName?: string): void;
|
||||
ensureExpectedIsNumber(actual: any, matcherName?: string): void;
|
||||
ensureNoExpected(actual: any, matcherName?: string): void;
|
||||
|
||||
@@ -10,6 +10,10 @@ declare const $: any;
|
||||
// Tests based on the Jest website
|
||||
jest.unmock('../sum');
|
||||
|
||||
class TestClass { }
|
||||
|
||||
describe(TestClass, () => { });
|
||||
|
||||
describe('sum', () => {
|
||||
it('adds 1 + 2 to equal 3', () => {
|
||||
const sum: (a: number, b: number) => number = require('../sum');
|
||||
|
||||
Vendored
+11
-2
@@ -165,6 +165,11 @@ export interface IPOptions {
|
||||
cidr?: string
|
||||
}
|
||||
|
||||
export interface StringRegexOptions {
|
||||
name?: string;
|
||||
invert?: boolean;
|
||||
}
|
||||
|
||||
export interface JoiObject {
|
||||
isJoi: boolean;
|
||||
}
|
||||
@@ -552,9 +557,13 @@ export interface StringSchema extends AnySchema {
|
||||
/**
|
||||
* Defines a regular expression rule.
|
||||
* @param pattern - a regular expression object the string value must match against.
|
||||
* @param name - optional name for patterns (useful with multiple patterns). Defaults to 'required'.
|
||||
* @param options - optional, can be:
|
||||
* Name for patterns (useful with multiple patterns). Defaults to 'required'.
|
||||
* An optional configuration object with the following supported properties:
|
||||
* name - optional pattern name.
|
||||
* invert - optional boolean flag. Defaults to false behavior. If specified as true, the provided pattern will be disallowed instead of required.
|
||||
*/
|
||||
regex(pattern: RegExp, name?: string): this;
|
||||
regex(pattern: RegExp, options?: string | StringRegexOptions): this;
|
||||
|
||||
/**
|
||||
* Replace characters matching the given pattern with the specified replacement string where:
|
||||
|
||||
@@ -135,6 +135,13 @@ refOpts = { contextPrefix: str };
|
||||
|
||||
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
||||
|
||||
let stringRegexOpts: Joi.StringRegexOptions = null;
|
||||
|
||||
stringRegexOpts = { name: str };
|
||||
stringRegexOpts = { invert: bool };
|
||||
|
||||
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
||||
|
||||
let validErr: Joi.ValidationError = null;
|
||||
let validErrItem: Joi.ValidationErrorItem;
|
||||
let validErrFunc: Joi.ValidationErrorFunction;
|
||||
@@ -764,6 +771,7 @@ strSchema = strSchema.length(ref);
|
||||
strSchema = strSchema.length(ref, str);
|
||||
strSchema = strSchema.regex(exp);
|
||||
strSchema = strSchema.regex(exp, str);
|
||||
strSchema = strSchema.regex(exp, stringRegexOpts);
|
||||
strSchema = strSchema.replace(exp, str);
|
||||
strSchema = strSchema.replace(str, str);
|
||||
strSchema = strSchema.alphanum();
|
||||
|
||||
Vendored
+1
-1
@@ -236,7 +236,7 @@ declare namespace Fancytree {
|
||||
/** Outer element of single nodes */
|
||||
span: HTMLElement;
|
||||
/** Outer element of single nodes for table extension */
|
||||
tr: HTMLElement;
|
||||
tr: HTMLTableRowElement;
|
||||
//#endregion
|
||||
|
||||
//#region Methods
|
||||
|
||||
Vendored
+124
@@ -0,0 +1,124 @@
|
||||
// Type definitions for karma-viewport 0.4
|
||||
// Project: https://github.com/squidfunk/karma-viewport
|
||||
// Definitions by: Karak <https://github.com/karak>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// Type definition file for 'karma-viewport'
|
||||
// https://www.npmjs.com/package/karma-viewport
|
||||
|
||||
declare namespace KarmaViewport {
|
||||
interface Breakpoint {
|
||||
name: string;
|
||||
size: {
|
||||
width: number,
|
||||
height: number,
|
||||
};
|
||||
}
|
||||
|
||||
interface Config {
|
||||
/** Context selector */
|
||||
context: string;
|
||||
/** Breakpoints */
|
||||
breakpoints: Breakpoint[];
|
||||
}
|
||||
|
||||
class Viewport {
|
||||
/**
|
||||
* Create viewport resizer
|
||||
*
|
||||
* @param config - Configuration
|
||||
* @param context - Initialization context
|
||||
*/
|
||||
constructor(config: Config, context: Window);
|
||||
|
||||
/**
|
||||
* Load and embed document into viewport
|
||||
*
|
||||
* @param url - URL of document to load
|
||||
* @param cb - Callback to execute after document was loaded
|
||||
*/
|
||||
load(url: string, cb: () => void): void;
|
||||
|
||||
/**
|
||||
* Set viewport to number or array
|
||||
*/
|
||||
set(width: number, height?: number): void;
|
||||
|
||||
/**
|
||||
* Set viewport to breakpoint identifier
|
||||
*/
|
||||
set(name: string): void;
|
||||
|
||||
/**
|
||||
* Reset viewport
|
||||
*/
|
||||
reset(): void;
|
||||
|
||||
/**
|
||||
* Execute a callback for all breakpoints between the first and last given
|
||||
*
|
||||
* @example
|
||||
* viewport.between("mobile", "tablet", name => {
|
||||
* ...
|
||||
* })
|
||||
*
|
||||
* @param first - First breakpoint name
|
||||
* @param last - Last breakpoint name
|
||||
* @param cb - Callback to execute after resizing
|
||||
*/
|
||||
between(first: string, last: string, cb: (name: string) => void): void;
|
||||
|
||||
/**
|
||||
* Execute a callback for all breakpoints
|
||||
*
|
||||
* @example
|
||||
* viewport.each(name => {
|
||||
* ...
|
||||
* })
|
||||
*
|
||||
* @param cb - Callback to execute after resizing
|
||||
*/
|
||||
each(cb: (name: string) => void): void;
|
||||
|
||||
/**
|
||||
* Execute a callback starting at the given breakpoint
|
||||
*
|
||||
* @example
|
||||
* viewport.from("tablet", name => {
|
||||
* ...
|
||||
* })
|
||||
*
|
||||
* @param first - First breakpoint name
|
||||
* @param cb - Callback to execute after resizing
|
||||
*/
|
||||
from(first: string, cb: (name: string) => void): void;
|
||||
|
||||
/**
|
||||
* Execute a callback ending at the given breakpoint
|
||||
*
|
||||
* @example
|
||||
* viewport.to("tablet", name => {
|
||||
* ...
|
||||
* })
|
||||
*
|
||||
* @param last - Last breakpoint name
|
||||
* @param cb - Callback to execute after resizing
|
||||
*/
|
||||
to(last: string, cb: (name: string) => void): void;
|
||||
|
||||
/**
|
||||
* Retrieve configuration
|
||||
*
|
||||
* @return Configuration
|
||||
*/
|
||||
readonly config: Config; // get config()
|
||||
|
||||
/**
|
||||
* Retrieve context element
|
||||
*
|
||||
* @return context element
|
||||
*/
|
||||
readonly element: HTMLIFrameElement; // get element()
|
||||
}
|
||||
}
|
||||
|
||||
declare const viewport: KarmaViewport.Viewport;
|
||||
@@ -0,0 +1,46 @@
|
||||
// Set to 320px x 100%
|
||||
viewport.set(320);
|
||||
|
||||
// Set to 320px x 480px
|
||||
viewport.set(320, 480);
|
||||
|
||||
// Set to 320px x 480px by breakpoints
|
||||
viewport.set("mobile");
|
||||
|
||||
// Reset to 100% x 100%
|
||||
viewport.reset();
|
||||
|
||||
// Load entire webpages for testing:
|
||||
viewport.load("/path/to/fixture.html", () => console.log('done'));
|
||||
|
||||
// Run tests for mobile, tablet and screen
|
||||
viewport.each(name => {
|
||||
// ...
|
||||
});
|
||||
|
||||
// Run tests for tablet and screen
|
||||
viewport.from("tablet", name => {
|
||||
// ...
|
||||
});
|
||||
|
||||
// Run tests for mobile and tablet
|
||||
viewport.to("tablet", name => {
|
||||
// ...
|
||||
});
|
||||
|
||||
// Run tests for tablet and screen
|
||||
viewport.between("tablet", "screen", name => {
|
||||
// ...
|
||||
});
|
||||
|
||||
// get config
|
||||
viewport.config.breakpoints.forEach(breakpoint => {
|
||||
const name: string = breakpoint.name;
|
||||
const width: number = breakpoint.size.width;
|
||||
const height: number = breakpoint.size.height;
|
||||
});
|
||||
|
||||
const contextSelector: string = viewport.config.context;
|
||||
|
||||
// get element
|
||||
const iframe: HTMLIFrameElement = viewport.element;
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"karma-viewport-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Vendored
+56
@@ -0,0 +1,56 @@
|
||||
// Type definitions for keyv 3.0
|
||||
// Project: https://github.com/lukechilds/keyv
|
||||
// Definitions by: AryloYeung <https://github.com/Arylo>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.1
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
interface KeyvOptions {
|
||||
/** Namespace for the current instance. */
|
||||
namespace?: string;
|
||||
/** A custom serialization function. */
|
||||
serialize?: (data: any) => string;
|
||||
/** A custom deserialization function. */
|
||||
deserialize?: (data: string) => any;
|
||||
/** The connection string URI. */
|
||||
uri?: string;
|
||||
/** The storage adapter instance to be used by Keyv. */
|
||||
store?: any;
|
||||
/** Default TTL. Can be overridden by specififying a TTL on `.set()`. */
|
||||
ttl?: number;
|
||||
/** Specify an adapter to use. e.g `'redis'` or `'mongodb'`. */
|
||||
adapter?: string;
|
||||
}
|
||||
|
||||
declare class Keyv extends NodeJS.EventEmitter {
|
||||
/**
|
||||
* @param opts The options object is also passed through to the storage adapter. Check your storage adapter docs for any extra options.
|
||||
*/
|
||||
constructor(opts?: KeyvOptions);
|
||||
/**
|
||||
* @param uri The connection string URI.
|
||||
*
|
||||
* Merged into the options object as options.uri.
|
||||
* @param opts The options object is also passed through to the storage adapter. Check your storage adapter docs for any extra options.
|
||||
*/
|
||||
constructor(uri?: string, opts?: KeyvOptions);
|
||||
/** Returns the value. */
|
||||
get(key: string): Promise<any>;
|
||||
/**
|
||||
* Set a value.
|
||||
*
|
||||
* By default keys are persistent. You can set an expiry TTL in milliseconds.
|
||||
*/
|
||||
set(key: string, value: any, ttl?: number): Promise<boolean>;
|
||||
/**
|
||||
* Deletes an entry.
|
||||
*
|
||||
* Returns `true` if the key existed, `false` if not.
|
||||
*/
|
||||
delete(key: string): Promise<boolean>;
|
||||
/** Delete all entries in the current namespace. */
|
||||
clear(): Promise<void>;
|
||||
}
|
||||
|
||||
export = Keyv;
|
||||
@@ -0,0 +1,25 @@
|
||||
import Keyv = require("keyv");
|
||||
|
||||
new Keyv({
|
||||
uri: 'redis://user:pass@localhost:6379',
|
||||
namespace: "redis"
|
||||
});
|
||||
|
||||
new Keyv('mongodb://user:pass@localhost:27017/dbname');
|
||||
new Keyv('redis://user:pass@localhost:6379');
|
||||
new Keyv('sqlite://path/to/database.sqlite');
|
||||
new Keyv('postgresql://user:pass@localhost:5432/dbname');
|
||||
new Keyv('mysql://user:pass@localhost:3306/dbname');
|
||||
new Keyv();
|
||||
|
||||
(async () => {
|
||||
const keyv = new Keyv();
|
||||
|
||||
keyv.on('error', err => console.log('Connection Error', err));
|
||||
|
||||
await keyv.set('foo', 'expires in 1 second', 1000); // true
|
||||
await keyv.set('foo', 'never expires'); // true
|
||||
await keyv.get('foo'); // 'never expires'
|
||||
await keyv.delete('foo'); // true
|
||||
await keyv.clear(); // undefined
|
||||
})();
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"keyv-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Vendored
+7
-25
@@ -916,27 +916,15 @@ declare module "../index" {
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Flattens a nested array. If isDeep is true the array is recursively flattened, otherwise it’s only
|
||||
* flattened a single level.
|
||||
* Flattens `array` a single level deep.
|
||||
*
|
||||
* @param array The array to flatten.
|
||||
* @param isDeep Specify a deep flatten.
|
||||
* @return Returns the new flattened array.
|
||||
*/
|
||||
flatten<T>(array: ListOfRecursiveArraysOrValues<T> | null | undefined, isDeep: boolean): T[];
|
||||
|
||||
/**
|
||||
* @see _.flatten
|
||||
*/
|
||||
flatten<T>(array: List<Many<T>> | null | undefined): T[];
|
||||
}
|
||||
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.flatten
|
||||
*/
|
||||
flatten<T>(this: LoDashImplicitWrapper<ListOfRecursiveArraysOrValues<T> | null | undefined>, isDeep: boolean): LoDashImplicitWrapper<T[]>;
|
||||
|
||||
/**
|
||||
* @see _.flatten
|
||||
*/
|
||||
@@ -944,11 +932,6 @@ declare module "../index" {
|
||||
}
|
||||
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.flatten
|
||||
*/
|
||||
flatten<T>(this: LoDashExplicitWrapper<ListOfRecursiveArraysOrValues<T> | null | undefined>, isDeep: boolean): LoDashExplicitWrapper<T[]>;
|
||||
|
||||
/**
|
||||
* @see _.flatten
|
||||
*/
|
||||
@@ -1102,8 +1085,7 @@ declare module "../index" {
|
||||
* Gets the index at which the first occurrence of `value` is found in `array`
|
||||
* using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
|
||||
* for equality comparisons. If `fromIndex` is negative, it's used as the offset
|
||||
* from the end of `array`. If `array` is sorted providing `true` for `fromIndex`
|
||||
* performs a faster binary search.
|
||||
* from the end of `array`.
|
||||
*
|
||||
* @category Array
|
||||
* @param array The array to search.
|
||||
@@ -1122,7 +1104,7 @@ declare module "../index" {
|
||||
indexOf<T>(
|
||||
array: List<T> | null | undefined,
|
||||
value: T,
|
||||
fromIndex?: boolean|number
|
||||
fromIndex?: number
|
||||
): number;
|
||||
}
|
||||
|
||||
@@ -1133,7 +1115,7 @@ declare module "../index" {
|
||||
indexOf<T>(
|
||||
this: LoDashImplicitWrapper<List<T> | null | undefined>,
|
||||
value: T,
|
||||
fromIndex?: boolean|number
|
||||
fromIndex?: number
|
||||
): number;
|
||||
}
|
||||
|
||||
@@ -1144,7 +1126,7 @@ declare module "../index" {
|
||||
indexOf<T>(
|
||||
this: LoDashExplicitWrapper<List<T> | null | undefined>,
|
||||
value: T,
|
||||
fromIndex?: boolean|number
|
||||
fromIndex?: number
|
||||
): LoDashExplicitWrapper<number>;
|
||||
}
|
||||
|
||||
@@ -3463,7 +3445,7 @@ declare module "../index" {
|
||||
/**
|
||||
* @see _.zip
|
||||
*/
|
||||
zip<T>(...arrays: Array<List<T> | null | undefined>): (T | undefined)[][];
|
||||
zip<T>(...arrays: Array<List<T> | null | undefined>): Array<Array<T | undefined>>;
|
||||
}
|
||||
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
@@ -3842,4 +3824,4 @@ declare module "../index" {
|
||||
...iteratee: Array<((...group: T[]) => TResult) | List<T> | null | undefined>
|
||||
): LoDashExplicitWrapper<TResult[]>;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+8
-8
@@ -516,13 +516,13 @@ declare module "../index" {
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* This method is like _.find except that it iterates over elements of a collection from
|
||||
* right to left.
|
||||
* @param collection Searches for a value in this list.
|
||||
* @param predicate The function called per iteration.
|
||||
* @param fromIndex The index to search from.
|
||||
* @return The found element, else undefined.
|
||||
**/
|
||||
* This method is like _.find except that it iterates over elements of a collection from
|
||||
* right to left.
|
||||
* @param collection Searches for a value in this list.
|
||||
* @param predicate The function called per iteration.
|
||||
* @param fromIndex The index to search from.
|
||||
* @return The found element, else undefined.
|
||||
*/
|
||||
findLast<T, S extends T>(
|
||||
collection: List<T> | null | undefined,
|
||||
predicate: ListIteratorTypeGuard<T, S>,
|
||||
@@ -2720,4 +2720,4 @@ declare module "../index" {
|
||||
...iteratees: Array<Many<ObjectIteratee<T>>>
|
||||
): LoDashExplicitWrapper<Array<T[keyof T]>>;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+8
-2
@@ -1,4 +1,5 @@
|
||||
import _ = require("../index");
|
||||
// tslint:disable-next-line:strict-export-declare-modifiers
|
||||
type GlobalPartial<T> = Partial<T>;
|
||||
declare module "../index" {
|
||||
type PartialObject<T> = GlobalPartial<T>;
|
||||
@@ -86,7 +87,6 @@ declare module "../index" {
|
||||
templateSettings: TemplateSettings;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* By default, the template delimiters used by Lo-Dash are similar to those in embedded Ruby
|
||||
* (ERB). Change the following template settings to use alternative delimiters.
|
||||
@@ -193,17 +193,23 @@ declare module "../index" {
|
||||
|
||||
type StringIterator<TResult> = (char: string, index: number, string: string) => TResult;
|
||||
|
||||
/** @deprecated Use MemoVoidArrayIterator or MemoVoidDictionaryIterator instead. */
|
||||
type MemoVoidIterator<T, TResult> = (prev: TResult, curr: T, indexOrKey: any, list: T[]) => void;
|
||||
|
||||
/** @deprecated Use MemoListIterator or MemoObjectIterator instead. */
|
||||
/** @deprecated Use MemoListIterator or MemoObjectIterator instead. */
|
||||
type MemoIterator<T, TResult> = (prev: TResult, curr: T, indexOrKey: any, list: T[]) => TResult;
|
||||
type MemoListIterator<T, TResult, TList> = (prev: TResult, curr: T, index: number, list: TList) => TResult;
|
||||
type MemoObjectIterator<T, TResult, TList> = (prev: TResult, curr: T, key: string, list: TList) => TResult;
|
||||
type MemoIteratorCapped<T, TResult> = (prev: TResult, curr: T) => TResult;
|
||||
type MemoIteratorCappedRight<T, TResult> = (curr: T, prev: TResult) => TResult;
|
||||
|
||||
type MemoVoidArrayIterator<T, TResult> = (acc: TResult, curr: T, index: number, arr: T[]) => void;
|
||||
type MemoVoidDictionaryIterator<T, TResult> = (acc: TResult, curr: T, key: string, dict: Dictionary<T>) => void;
|
||||
type MemoVoidIteratorCapped<T, TResult> = (acc: TResult, curr: T) => void;
|
||||
|
||||
type ValueIteratee<T> = ((value: T) => NotVoid) | string | [string, any] | PartialDeep<T>;
|
||||
type ValueIterateeCustom<T, TResult> = ((value: T) => TResult) | string | [string, any] | PartialDeep<T>;
|
||||
type ValueIteratorTypeGuard<T, S extends T> = (value: T) => value is S;
|
||||
type ValueKeyIteratee<T> = ((value: T, key: string) => NotVoid) | string | [string, any] | PartialDeep<T>;
|
||||
type Comparator<T> = (a: T, b: T) => boolean;
|
||||
type Comparator2<T1, T2> = (a: T1, b: T2) => boolean;
|
||||
|
||||
Vendored
+1
-1
@@ -24,4 +24,4 @@ declare module "../index" {
|
||||
*/
|
||||
now(): LoDashExplicitWrapper<number>;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+50
-50
@@ -667,30 +667,30 @@ declare module "../index" {
|
||||
// flip
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Creates a function that invokes `func` with arguments reversed.
|
||||
*
|
||||
* @category Function
|
||||
* @param func The function to flip arguments for.
|
||||
* @returns Returns the new function.
|
||||
* @example
|
||||
*
|
||||
* var flipped = _.flip(function() {
|
||||
* return _.toArray(arguments);
|
||||
* });
|
||||
*
|
||||
* flipped('a', 'b', 'c', 'd');
|
||||
* // => ['d', 'c', 'b', 'a']
|
||||
*/
|
||||
flip<T extends (...args: any[]) => any>(func: T): T;
|
||||
}
|
||||
/**
|
||||
* Creates a function that invokes `func` with arguments reversed.
|
||||
*
|
||||
* @category Function
|
||||
* @param func The function to flip arguments for.
|
||||
* @returns Returns the new function.
|
||||
* @example
|
||||
*
|
||||
* var flipped = _.flip(function() {
|
||||
* return _.toArray(arguments);
|
||||
* });
|
||||
*
|
||||
* flipped('a', 'b', 'c', 'd');
|
||||
* // => ['d', 'c', 'b', 'a']
|
||||
*/
|
||||
flip<T extends (...args: any[]) => any>(func: T): T;
|
||||
}
|
||||
|
||||
interface LoDashWrapper<TValue> {
|
||||
/**
|
||||
* @see _.flip
|
||||
*/
|
||||
flip(): this;
|
||||
}
|
||||
interface LoDashWrapper<TValue> {
|
||||
/**
|
||||
* @see _.flip
|
||||
*/
|
||||
flip(): this;
|
||||
}
|
||||
|
||||
// memoize
|
||||
|
||||
@@ -771,34 +771,34 @@ declare module "../index" {
|
||||
|
||||
// overArgs
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Creates a function that runs each argument through a corresponding transform function.
|
||||
*
|
||||
* @param func The function to wrap.
|
||||
* @param transforms The functions to transform arguments, specified as individual functions or arrays
|
||||
* of functions.
|
||||
* @return Returns the new function.
|
||||
*/
|
||||
overArgs(
|
||||
func: (...args: any[]) => any,
|
||||
...transforms: Array<Many<(...args: any[]) => any>>
|
||||
): (...args: any[]) => any;
|
||||
}
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Creates a function that runs each argument through a corresponding transform function.
|
||||
*
|
||||
* @param func The function to wrap.
|
||||
* @param transforms The functions to transform arguments, specified as individual functions or arrays
|
||||
* of functions.
|
||||
* @return Returns the new function.
|
||||
*/
|
||||
overArgs(
|
||||
func: (...args: any[]) => any,
|
||||
...transforms: Array<Many<(...args: any[]) => any>>
|
||||
): (...args: any[]) => any;
|
||||
}
|
||||
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.overArgs
|
||||
*/
|
||||
overArgs(...transforms: Array<Many<(...args: any[]) => any>>): LoDashImplicitWrapper<(...args: any[]) => any>;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.overArgs
|
||||
*/
|
||||
overArgs(...transforms: Array<Many<(...args: any[]) => any>>): LoDashImplicitWrapper<(...args: any[]) => any>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.overArgs
|
||||
*/
|
||||
overArgs(...transforms: Array<Many<(...args: any[]) => any>>): LoDashExplicitWrapper<(...args: any[]) => any>;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.overArgs
|
||||
*/
|
||||
overArgs(...transforms: Array<Many<(...args: any[]) => any>>): LoDashExplicitWrapper<(...args: any[]) => any>;
|
||||
}
|
||||
|
||||
// partial
|
||||
|
||||
@@ -1364,4 +1364,4 @@ declare module "../index" {
|
||||
wrapper: (value: TValue, ...args: any[]) => TResult
|
||||
): LoDashExplicitWrapper<(...args: any[]) => TResult>;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+3
-4
@@ -210,7 +210,6 @@ declare module "../index" {
|
||||
|
||||
// conformsTo
|
||||
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Checks if object conforms to source by invoking the predicate properties of source with the
|
||||
@@ -233,11 +232,11 @@ declare module "../index" {
|
||||
/**
|
||||
* @see _.conformsTo
|
||||
*/
|
||||
conformsTo<T>(this: LoDashImplicitWrapper<T>, source: ConformsPredicateObject<T>): LoDashExplicitWrapper<boolean>;
|
||||
conformsTo<T>(this: LoDashExplicitWrapper<T>, source: ConformsPredicateObject<T>): LoDashExplicitWrapper<boolean>;
|
||||
// Note: we can't use TValue here, because it generates a typescript error when strictFunctionTypes is enabled.
|
||||
}
|
||||
|
||||
type CondPair<T, R> = [(val: T) => boolean, (val: T) => R]
|
||||
type CondPair<T, R> = [(val: T) => boolean, (val: T) => R];
|
||||
|
||||
// eq
|
||||
|
||||
@@ -1934,4 +1933,4 @@ declare module "../index" {
|
||||
*/
|
||||
toString(value: any): string;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
-5
@@ -529,8 +529,4 @@ declare module "../index" {
|
||||
iteratee?: ((value: T) => number) | string
|
||||
): LoDashExplicitWrapper<number>;
|
||||
}
|
||||
|
||||
/**********
|
||||
* Number *
|
||||
**********/
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
-5
@@ -175,8 +175,4 @@ declare module "../index" {
|
||||
floating?: boolean
|
||||
): LoDashExplicitWrapper<number>;
|
||||
}
|
||||
|
||||
/**********
|
||||
* Object *
|
||||
**********/
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+56
-5
@@ -2281,7 +2281,7 @@ declare module "../index" {
|
||||
* TODO: This would be better if we had a separate overload for obj: NumericDictionary that returned a NumericDictionary,
|
||||
* but TypeScript cannot select overload signatures based on number vs string index key type.
|
||||
*/
|
||||
mapValues<T, TResult>(obj: Dictionary<T> | NumericDictionary<T> | null | undefined, callback: ObjectIterator<Dictionary<T>, TResult>): Dictionary<TResult>;
|
||||
mapValues<T, TResult>(obj: Dictionary<T> | NumericDictionary<T> | null | undefined, callback: DictionaryIterator<T, TResult>): Dictionary<TResult>;
|
||||
|
||||
/**
|
||||
* @see _.mapValues
|
||||
@@ -2358,7 +2358,7 @@ declare module "../index" {
|
||||
*/
|
||||
mapValues<T, TResult>(
|
||||
this: LoDashImplicitWrapper<Dictionary<T> | NumericDictionary<T> | null | undefined>,
|
||||
callback: ObjectIterator<Dictionary<T>, TResult>
|
||||
callback: DictionaryIterator<T, TResult>
|
||||
): LoDashImplicitWrapper<Dictionary<TResult>>;
|
||||
|
||||
/**
|
||||
@@ -2454,7 +2454,7 @@ declare module "../index" {
|
||||
*/
|
||||
mapValues<T, TResult>(
|
||||
this: LoDashExplicitWrapper<Dictionary<T> | NumericDictionary<T> | null | undefined>,
|
||||
callback: ObjectIterator<Dictionary<T>, TResult>
|
||||
callback: DictionaryIterator<T, TResult>
|
||||
): LoDashExplicitWrapper<Dictionary<TResult>>;
|
||||
|
||||
/**
|
||||
@@ -2680,6 +2680,10 @@ declare module "../index" {
|
||||
* @see _.merge
|
||||
*/
|
||||
merge<TSource1, TSource2, TSource3, TSource4>(
|
||||
source1: TSource1,
|
||||
source2: TSource2,
|
||||
source3: TSource3,
|
||||
source4: TSource4
|
||||
): LoDashExplicitWrapper<TValue & TSource1 & TSource2 & TSource3 & TSource4>;
|
||||
|
||||
/**
|
||||
@@ -2692,7 +2696,7 @@ declare module "../index" {
|
||||
|
||||
// mergeWith
|
||||
|
||||
type MergeWithCustomizer = { bivariantHack(value: any, srcValue: any, key: string, object: any, source: any): any; }["bivariantHack"]
|
||||
type MergeWithCustomizer = { bivariantHack(value: any, srcValue: any, key: string, object: any, source: any): any; }["bivariantHack"];
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
@@ -2823,6 +2827,53 @@ declare module "../index" {
|
||||
): LoDashImplicitWrapper<any>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.mergeWith
|
||||
*/
|
||||
mergeWith<TSource>(
|
||||
source: TSource,
|
||||
customizer: MergeWithCustomizer
|
||||
): LoDashExplicitWrapper<TValue & TSource>;
|
||||
|
||||
/**
|
||||
* @see _.mergeWith
|
||||
*/
|
||||
mergeWith<TSource1, TSource2>(
|
||||
source1: TSource1,
|
||||
source2: TSource2,
|
||||
customizer: MergeWithCustomizer
|
||||
): LoDashExplicitWrapper<TValue & TSource1 & TSource2>;
|
||||
|
||||
/**
|
||||
* @see _.mergeWith
|
||||
*/
|
||||
mergeWith<TSource1, TSource2, TSource3>(
|
||||
source1: TSource1,
|
||||
source2: TSource2,
|
||||
source3: TSource3,
|
||||
customizer: MergeWithCustomizer
|
||||
): LoDashExplicitWrapper<TValue & TSource1 & TSource2 & TSource3>;
|
||||
|
||||
/**
|
||||
* @see _.mergeWith
|
||||
*/
|
||||
mergeWith<TSource1, TSource2, TSource3, TSource4>(
|
||||
source1: TSource1,
|
||||
source2: TSource2,
|
||||
source3: TSource3,
|
||||
source4: TSource4,
|
||||
customizer: MergeWithCustomizer
|
||||
): LoDashExplicitWrapper<TValue & TSource1 & TSource2 & TSource3 & TSource4>;
|
||||
|
||||
/**
|
||||
* @see _.mergeWith
|
||||
*/
|
||||
mergeWith(
|
||||
...otherArgs: any[]
|
||||
): LoDashExplicitWrapper<any>;
|
||||
}
|
||||
|
||||
// omit
|
||||
|
||||
interface LoDashStatic {
|
||||
@@ -3719,4 +3770,4 @@ declare module "../index" {
|
||||
*/
|
||||
valuesIn<T extends object>(this: LoDashExplicitWrapper<T | null | undefined>): LoDashExplicitWrapper<Array<T[keyof T]>>;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -195,4 +195,4 @@ declare module "../index" {
|
||||
*/
|
||||
thru<TResult>(interceptor: (value: TValue) => TResult): LoDashExplicitWrapper<TResult>;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -1056,4 +1056,4 @@ declare module "../index" {
|
||||
*/
|
||||
words(pattern?: string|RegExp): LoDashExplicitWrapper<string[]>;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+10
-2
@@ -584,9 +584,17 @@ declare module "../index" {
|
||||
* // => [{ 'user': 'fred', 'age': 40 }]
|
||||
*/
|
||||
iteratee<TFunction extends (...args: any[]) => any>(
|
||||
func: TFunction | string | object
|
||||
func: TFunction
|
||||
): TFunction;
|
||||
|
||||
/**
|
||||
* @see _.iteratee
|
||||
*/
|
||||
// tslint:disable-next-line:unified-signatures Tests fail in TS2.3 if the overloads are joined
|
||||
iteratee(
|
||||
func: string | object
|
||||
): (...args: any[]) => any;
|
||||
|
||||
/**
|
||||
* @see _.iteratee
|
||||
*/
|
||||
@@ -1452,4 +1460,4 @@ declare module "../index" {
|
||||
*/
|
||||
uniqueId(): LoDashExplicitWrapper<string>;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+790
@@ -0,0 +1,790 @@
|
||||
// AUTO-GENERATED: do not modify this file directly.
|
||||
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
|
||||
// npm run fp
|
||||
|
||||
import add = require("./fp/add");
|
||||
import after = require("./fp/after");
|
||||
import all = require("./fp/all");
|
||||
import allPass = require("./fp/allPass");
|
||||
import always = require("./fp/always");
|
||||
import any = require("./fp/any");
|
||||
import anyPass = require("./fp/anyPass");
|
||||
import apply = require("./fp/apply");
|
||||
import ary = require("./fp/ary");
|
||||
import assign = require("./fp/assign");
|
||||
import assignAll = require("./fp/assignAll");
|
||||
import assignAllWith = require("./fp/assignAllWith");
|
||||
import assignIn = require("./fp/assignIn");
|
||||
import assignInAll = require("./fp/assignInAll");
|
||||
import assignInAllWith = require("./fp/assignInAllWith");
|
||||
import assignInWith = require("./fp/assignInWith");
|
||||
import assignWith = require("./fp/assignWith");
|
||||
import assoc = require("./fp/assoc");
|
||||
import assocPath = require("./fp/assocPath");
|
||||
import at = require("./fp/at");
|
||||
import attempt = require("./fp/attempt");
|
||||
import before = require("./fp/before");
|
||||
import bind = require("./fp/bind");
|
||||
import bindAll = require("./fp/bindAll");
|
||||
import bindKey = require("./fp/bindKey");
|
||||
import camelCase = require("./fp/camelCase");
|
||||
import capitalize = require("./fp/capitalize");
|
||||
import castArray = require("./fp/castArray");
|
||||
import ceil = require("./fp/ceil");
|
||||
import chunk = require("./fp/chunk");
|
||||
import clamp = require("./fp/clamp");
|
||||
import clone = require("./fp/clone");
|
||||
import cloneDeep = require("./fp/cloneDeep");
|
||||
import cloneDeepWith = require("./fp/cloneDeepWith");
|
||||
import cloneWith = require("./fp/cloneWith");
|
||||
import compact = require("./fp/compact");
|
||||
import complement = require("./fp/complement");
|
||||
import compose = require("./fp/compose");
|
||||
import concat = require("./fp/concat");
|
||||
import cond = require("./fp/cond");
|
||||
import conforms = require("./fp/conforms");
|
||||
import conformsTo = require("./fp/conformsTo");
|
||||
import constant = require("./fp/constant");
|
||||
import contains = require("./fp/contains");
|
||||
import countBy = require("./fp/countBy");
|
||||
import create = require("./fp/create");
|
||||
import curry = require("./fp/curry");
|
||||
import curryN = require("./fp/curryN");
|
||||
import curryRight = require("./fp/curryRight");
|
||||
import curryRightN = require("./fp/curryRightN");
|
||||
import debounce = require("./fp/debounce");
|
||||
import deburr = require("./fp/deburr");
|
||||
import defaults = require("./fp/defaults");
|
||||
import defaultsAll = require("./fp/defaultsAll");
|
||||
import defaultsDeep = require("./fp/defaultsDeep");
|
||||
import defaultsDeepAll = require("./fp/defaultsDeepAll");
|
||||
import defaultTo = require("./fp/defaultTo");
|
||||
import defer = require("./fp/defer");
|
||||
import delay = require("./fp/delay");
|
||||
import difference = require("./fp/difference");
|
||||
import differenceBy = require("./fp/differenceBy");
|
||||
import differenceWith = require("./fp/differenceWith");
|
||||
import dissoc = require("./fp/dissoc");
|
||||
import dissocPath = require("./fp/dissocPath");
|
||||
import divide = require("./fp/divide");
|
||||
import drop = require("./fp/drop");
|
||||
import dropLast = require("./fp/dropLast");
|
||||
import dropLastWhile = require("./fp/dropLastWhile");
|
||||
import dropRight = require("./fp/dropRight");
|
||||
import dropRightWhile = require("./fp/dropRightWhile");
|
||||
import dropWhile = require("./fp/dropWhile");
|
||||
import each = require("./fp/each");
|
||||
import eachRight = require("./fp/eachRight");
|
||||
import endsWith = require("./fp/endsWith");
|
||||
import entries = require("./fp/entries");
|
||||
import entriesIn = require("./fp/entriesIn");
|
||||
import eq = require("./fp/eq");
|
||||
import equals = require("./fp/equals");
|
||||
import escape = require("./fp/escape");
|
||||
import escapeRegExp = require("./fp/escapeRegExp");
|
||||
import every = require("./fp/every");
|
||||
import extend = require("./fp/extend");
|
||||
import extendAll = require("./fp/extendAll");
|
||||
import extendAllWith = require("./fp/extendAllWith");
|
||||
import extendWith = require("./fp/extendWith");
|
||||
import F = require("./fp/F");
|
||||
import fill = require("./fp/fill");
|
||||
import filter = require("./fp/filter");
|
||||
import find = require("./fp/find");
|
||||
import findFrom = require("./fp/findFrom");
|
||||
import findIndex = require("./fp/findIndex");
|
||||
import findIndexFrom = require("./fp/findIndexFrom");
|
||||
import findKey = require("./fp/findKey");
|
||||
import findLast = require("./fp/findLast");
|
||||
import findLastFrom = require("./fp/findLastFrom");
|
||||
import findLastIndex = require("./fp/findLastIndex");
|
||||
import findLastIndexFrom = require("./fp/findLastIndexFrom");
|
||||
import findLastKey = require("./fp/findLastKey");
|
||||
import first = require("./fp/first");
|
||||
import flatMap = require("./fp/flatMap");
|
||||
import flatMapDeep = require("./fp/flatMapDeep");
|
||||
import flatMapDepth = require("./fp/flatMapDepth");
|
||||
import flatten = require("./fp/flatten");
|
||||
import flattenDeep = require("./fp/flattenDeep");
|
||||
import flattenDepth = require("./fp/flattenDepth");
|
||||
import flip = require("./fp/flip");
|
||||
import floor = require("./fp/floor");
|
||||
import flow = require("./fp/flow");
|
||||
import flowRight = require("./fp/flowRight");
|
||||
import forEach = require("./fp/forEach");
|
||||
import forEachRight = require("./fp/forEachRight");
|
||||
import forIn = require("./fp/forIn");
|
||||
import forInRight = require("./fp/forInRight");
|
||||
import forOwn = require("./fp/forOwn");
|
||||
import forOwnRight = require("./fp/forOwnRight");
|
||||
import fromPairs = require("./fp/fromPairs");
|
||||
import functions = require("./fp/functions");
|
||||
import functionsIn = require("./fp/functionsIn");
|
||||
import get = require("./fp/get");
|
||||
import getOr = require("./fp/getOr");
|
||||
import groupBy = require("./fp/groupBy");
|
||||
import gt = require("./fp/gt");
|
||||
import gte = require("./fp/gte");
|
||||
import has = require("./fp/has");
|
||||
import hasIn = require("./fp/hasIn");
|
||||
import head = require("./fp/head");
|
||||
import identical = require("./fp/identical");
|
||||
import identity = require("./fp/identity");
|
||||
import includes = require("./fp/includes");
|
||||
import includesFrom = require("./fp/includesFrom");
|
||||
import indexBy = require("./fp/indexBy");
|
||||
import indexOf = require("./fp/indexOf");
|
||||
import indexOfFrom = require("./fp/indexOfFrom");
|
||||
import init = require("./fp/init");
|
||||
import initial = require("./fp/initial");
|
||||
import inRange = require("./fp/inRange");
|
||||
import intersection = require("./fp/intersection");
|
||||
import intersectionBy = require("./fp/intersectionBy");
|
||||
import intersectionWith = require("./fp/intersectionWith");
|
||||
import invert = require("./fp/invert");
|
||||
import invertBy = require("./fp/invertBy");
|
||||
import invertObj = require("./fp/invertObj");
|
||||
import invoke = require("./fp/invoke");
|
||||
import invokeArgs = require("./fp/invokeArgs");
|
||||
import invokeArgsMap = require("./fp/invokeArgsMap");
|
||||
import invokeMap = require("./fp/invokeMap");
|
||||
import isArguments = require("./fp/isArguments");
|
||||
import isArray = require("./fp/isArray");
|
||||
import isArrayBuffer = require("./fp/isArrayBuffer");
|
||||
import isArrayLike = require("./fp/isArrayLike");
|
||||
import isArrayLikeObject = require("./fp/isArrayLikeObject");
|
||||
import isBoolean = require("./fp/isBoolean");
|
||||
import isBuffer = require("./fp/isBuffer");
|
||||
import isDate = require("./fp/isDate");
|
||||
import isElement = require("./fp/isElement");
|
||||
import isEmpty = require("./fp/isEmpty");
|
||||
import isEqual = require("./fp/isEqual");
|
||||
import isEqualWith = require("./fp/isEqualWith");
|
||||
import isError = require("./fp/isError");
|
||||
import isFinite = require("./fp/isFinite");
|
||||
import isFunction = require("./fp/isFunction");
|
||||
import isInteger = require("./fp/isInteger");
|
||||
import isLength = require("./fp/isLength");
|
||||
import isMap = require("./fp/isMap");
|
||||
import isMatch = require("./fp/isMatch");
|
||||
import isMatchWith = require("./fp/isMatchWith");
|
||||
import isNaN = require("./fp/isNaN");
|
||||
import isNative = require("./fp/isNative");
|
||||
import isNil = require("./fp/isNil");
|
||||
import isNull = require("./fp/isNull");
|
||||
import isNumber = require("./fp/isNumber");
|
||||
import isObject = require("./fp/isObject");
|
||||
import isObjectLike = require("./fp/isObjectLike");
|
||||
import isPlainObject = require("./fp/isPlainObject");
|
||||
import isRegExp = require("./fp/isRegExp");
|
||||
import isSafeInteger = require("./fp/isSafeInteger");
|
||||
import isSet = require("./fp/isSet");
|
||||
import isString = require("./fp/isString");
|
||||
import isSymbol = require("./fp/isSymbol");
|
||||
import isTypedArray = require("./fp/isTypedArray");
|
||||
import isUndefined = require("./fp/isUndefined");
|
||||
import isWeakMap = require("./fp/isWeakMap");
|
||||
import isWeakSet = require("./fp/isWeakSet");
|
||||
import iteratee = require("./fp/iteratee");
|
||||
import join = require("./fp/join");
|
||||
import juxt = require("./fp/juxt");
|
||||
import kebabCase = require("./fp/kebabCase");
|
||||
import keyBy = require("./fp/keyBy");
|
||||
import keys = require("./fp/keys");
|
||||
import keysIn = require("./fp/keysIn");
|
||||
import last = require("./fp/last");
|
||||
import lastIndexOf = require("./fp/lastIndexOf");
|
||||
import lastIndexOfFrom = require("./fp/lastIndexOfFrom");
|
||||
import lowerCase = require("./fp/lowerCase");
|
||||
import lowerFirst = require("./fp/lowerFirst");
|
||||
import lt = require("./fp/lt");
|
||||
import lte = require("./fp/lte");
|
||||
import map = require("./fp/map");
|
||||
import mapKeys = require("./fp/mapKeys");
|
||||
import mapValues = require("./fp/mapValues");
|
||||
import matches = require("./fp/matches");
|
||||
import matchesProperty = require("./fp/matchesProperty");
|
||||
import max = require("./fp/max");
|
||||
import maxBy = require("./fp/maxBy");
|
||||
import mean = require("./fp/mean");
|
||||
import meanBy = require("./fp/meanBy");
|
||||
import memoize = require("./fp/memoize");
|
||||
import merge = require("./fp/merge");
|
||||
import mergeAll = require("./fp/mergeAll");
|
||||
import mergeAllWith = require("./fp/mergeAllWith");
|
||||
import mergeWith = require("./fp/mergeWith");
|
||||
import method = require("./fp/method");
|
||||
import methodOf = require("./fp/methodOf");
|
||||
import min = require("./fp/min");
|
||||
import minBy = require("./fp/minBy");
|
||||
import multiply = require("./fp/multiply");
|
||||
import nAry = require("./fp/nAry");
|
||||
import negate = require("./fp/negate");
|
||||
import noConflict = require("./fp/noConflict");
|
||||
import noop = require("./fp/noop");
|
||||
import now = require("./fp/now");
|
||||
import nth = require("./fp/nth");
|
||||
import nthArg = require("./fp/nthArg");
|
||||
import omit = require("./fp/omit");
|
||||
import omitAll = require("./fp/omitAll");
|
||||
import omitBy = require("./fp/omitBy");
|
||||
import once = require("./fp/once");
|
||||
import orderBy = require("./fp/orderBy");
|
||||
import over = require("./fp/over");
|
||||
import overArgs = require("./fp/overArgs");
|
||||
import overEvery = require("./fp/overEvery");
|
||||
import overSome = require("./fp/overSome");
|
||||
import pad = require("./fp/pad");
|
||||
import padChars = require("./fp/padChars");
|
||||
import padCharsEnd = require("./fp/padCharsEnd");
|
||||
import padCharsStart = require("./fp/padCharsStart");
|
||||
import padEnd = require("./fp/padEnd");
|
||||
import padStart = require("./fp/padStart");
|
||||
import parseInt = require("./fp/parseInt");
|
||||
import partial = require("./fp/partial");
|
||||
import partialRight = require("./fp/partialRight");
|
||||
import partition = require("./fp/partition");
|
||||
import path = require("./fp/path");
|
||||
import pathEq = require("./fp/pathEq");
|
||||
import pathOr = require("./fp/pathOr");
|
||||
import paths = require("./fp/paths");
|
||||
import pick = require("./fp/pick");
|
||||
import pickAll = require("./fp/pickAll");
|
||||
import pickBy = require("./fp/pickBy");
|
||||
import pipe = require("./fp/pipe");
|
||||
import pluck = require("./fp/pluck");
|
||||
import prop = require("./fp/prop");
|
||||
import propEq = require("./fp/propEq");
|
||||
import property = require("./fp/property");
|
||||
import propertyOf = require("./fp/propertyOf");
|
||||
import propOr = require("./fp/propOr");
|
||||
import props = require("./fp/props");
|
||||
import pull = require("./fp/pull");
|
||||
import pullAll = require("./fp/pullAll");
|
||||
import pullAllBy = require("./fp/pullAllBy");
|
||||
import pullAllWith = require("./fp/pullAllWith");
|
||||
import pullAt = require("./fp/pullAt");
|
||||
import random = require("./fp/random");
|
||||
import range = require("./fp/range");
|
||||
import rangeRight = require("./fp/rangeRight");
|
||||
import rangeStep = require("./fp/rangeStep");
|
||||
import rangeStepRight = require("./fp/rangeStepRight");
|
||||
import rearg = require("./fp/rearg");
|
||||
import reduce = require("./fp/reduce");
|
||||
import reduceRight = require("./fp/reduceRight");
|
||||
import reject = require("./fp/reject");
|
||||
import remove = require("./fp/remove");
|
||||
import repeat = require("./fp/repeat");
|
||||
import replace = require("./fp/replace");
|
||||
import rest = require("./fp/rest");
|
||||
import restFrom = require("./fp/restFrom");
|
||||
import result = require("./fp/result");
|
||||
import reverse = require("./fp/reverse");
|
||||
import round = require("./fp/round");
|
||||
import runInContext = require("./fp/runInContext");
|
||||
import sample = require("./fp/sample");
|
||||
import sampleSize = require("./fp/sampleSize");
|
||||
import set = require("./fp/set");
|
||||
import setWith = require("./fp/setWith");
|
||||
import shuffle = require("./fp/shuffle");
|
||||
import size = require("./fp/size");
|
||||
import slice = require("./fp/slice");
|
||||
import snakeCase = require("./fp/snakeCase");
|
||||
import some = require("./fp/some");
|
||||
import sortBy = require("./fp/sortBy");
|
||||
import sortedIndex = require("./fp/sortedIndex");
|
||||
import sortedIndexBy = require("./fp/sortedIndexBy");
|
||||
import sortedIndexOf = require("./fp/sortedIndexOf");
|
||||
import sortedLastIndex = require("./fp/sortedLastIndex");
|
||||
import sortedLastIndexBy = require("./fp/sortedLastIndexBy");
|
||||
import sortedLastIndexOf = require("./fp/sortedLastIndexOf");
|
||||
import sortedUniq = require("./fp/sortedUniq");
|
||||
import sortedUniqBy = require("./fp/sortedUniqBy");
|
||||
import split = require("./fp/split");
|
||||
import spread = require("./fp/spread");
|
||||
import spreadFrom = require("./fp/spreadFrom");
|
||||
import startCase = require("./fp/startCase");
|
||||
import startsWith = require("./fp/startsWith");
|
||||
import stubArray = require("./fp/stubArray");
|
||||
import stubFalse = require("./fp/stubFalse");
|
||||
import stubObject = require("./fp/stubObject");
|
||||
import stubString = require("./fp/stubString");
|
||||
import stubTrue = require("./fp/stubTrue");
|
||||
import subtract = require("./fp/subtract");
|
||||
import sum = require("./fp/sum");
|
||||
import sumBy = require("./fp/sumBy");
|
||||
import symmetricDifference = require("./fp/symmetricDifference");
|
||||
import symmetricDifferenceBy = require("./fp/symmetricDifferenceBy");
|
||||
import symmetricDifferenceWith = require("./fp/symmetricDifferenceWith");
|
||||
import T = require("./fp/T");
|
||||
import tail = require("./fp/tail");
|
||||
import take = require("./fp/take");
|
||||
import takeLast = require("./fp/takeLast");
|
||||
import takeLastWhile = require("./fp/takeLastWhile");
|
||||
import takeRight = require("./fp/takeRight");
|
||||
import takeRightWhile = require("./fp/takeRightWhile");
|
||||
import takeWhile = require("./fp/takeWhile");
|
||||
import tap = require("./fp/tap");
|
||||
import template = require("./fp/template");
|
||||
import throttle = require("./fp/throttle");
|
||||
import thru = require("./fp/thru");
|
||||
import times = require("./fp/times");
|
||||
import toArray = require("./fp/toArray");
|
||||
import toFinite = require("./fp/toFinite");
|
||||
import toInteger = require("./fp/toInteger");
|
||||
import toLength = require("./fp/toLength");
|
||||
import toLower = require("./fp/toLower");
|
||||
import toNumber = require("./fp/toNumber");
|
||||
import toPairs = require("./fp/toPairs");
|
||||
import toPairsIn = require("./fp/toPairsIn");
|
||||
import toPath = require("./fp/toPath");
|
||||
import toPlainObject = require("./fp/toPlainObject");
|
||||
import toSafeInteger = require("./fp/toSafeInteger");
|
||||
import toString = require("./fp/toString");
|
||||
import toUpper = require("./fp/toUpper");
|
||||
import transform = require("./fp/transform");
|
||||
import trim = require("./fp/trim");
|
||||
import trimChars = require("./fp/trimChars");
|
||||
import trimCharsEnd = require("./fp/trimCharsEnd");
|
||||
import trimCharsStart = require("./fp/trimCharsStart");
|
||||
import trimEnd = require("./fp/trimEnd");
|
||||
import trimStart = require("./fp/trimStart");
|
||||
import truncate = require("./fp/truncate");
|
||||
import unapply = require("./fp/unapply");
|
||||
import unary = require("./fp/unary");
|
||||
import unescape = require("./fp/unescape");
|
||||
import union = require("./fp/union");
|
||||
import unionBy = require("./fp/unionBy");
|
||||
import unionWith = require("./fp/unionWith");
|
||||
import uniq = require("./fp/uniq");
|
||||
import uniqBy = require("./fp/uniqBy");
|
||||
import uniqueId = require("./fp/uniqueId");
|
||||
import uniqWith = require("./fp/uniqWith");
|
||||
import unnest = require("./fp/unnest");
|
||||
import unset = require("./fp/unset");
|
||||
import unzip = require("./fp/unzip");
|
||||
import unzipWith = require("./fp/unzipWith");
|
||||
import update = require("./fp/update");
|
||||
import updateWith = require("./fp/updateWith");
|
||||
import upperCase = require("./fp/upperCase");
|
||||
import upperFirst = require("./fp/upperFirst");
|
||||
import useWith = require("./fp/useWith");
|
||||
import values = require("./fp/values");
|
||||
import valuesIn = require("./fp/valuesIn");
|
||||
import where = require("./fp/where");
|
||||
import whereEq = require("./fp/whereEq");
|
||||
import without = require("./fp/without");
|
||||
import words = require("./fp/words");
|
||||
import wrap = require("./fp/wrap");
|
||||
import xor = require("./fp/xor");
|
||||
import xorBy = require("./fp/xorBy");
|
||||
import xorWith = require("./fp/xorWith");
|
||||
import zip = require("./fp/zip");
|
||||
import zipAll = require("./fp/zipAll");
|
||||
import zipObj = require("./fp/zipObj");
|
||||
import zipObject = require("./fp/zipObject");
|
||||
import zipObjectDeep = require("./fp/zipObjectDeep");
|
||||
import zipWith = require("./fp/zipWith");
|
||||
|
||||
export = _;
|
||||
|
||||
declare const _: _.LoDashFp;
|
||||
declare namespace _ {
|
||||
interface LoDashFp {
|
||||
add: typeof add;
|
||||
after: typeof after;
|
||||
all: typeof all;
|
||||
allPass: typeof allPass;
|
||||
always: typeof always;
|
||||
any: typeof any;
|
||||
anyPass: typeof anyPass;
|
||||
apply: typeof apply;
|
||||
ary: typeof ary;
|
||||
assign: typeof assign;
|
||||
assignAll: typeof assignAll;
|
||||
assignAllWith: typeof assignAllWith;
|
||||
assignIn: typeof assignIn;
|
||||
assignInAll: typeof assignInAll;
|
||||
assignInAllWith: typeof assignInAllWith;
|
||||
assignInWith: typeof assignInWith;
|
||||
assignWith: typeof assignWith;
|
||||
assoc: typeof assoc;
|
||||
assocPath: typeof assocPath;
|
||||
at: typeof at;
|
||||
attempt: typeof attempt;
|
||||
before: typeof before;
|
||||
bind: typeof bind;
|
||||
bindAll: typeof bindAll;
|
||||
bindKey: typeof bindKey;
|
||||
camelCase: typeof camelCase;
|
||||
capitalize: typeof capitalize;
|
||||
castArray: typeof castArray;
|
||||
ceil: typeof ceil;
|
||||
chunk: typeof chunk;
|
||||
clamp: typeof clamp;
|
||||
clone: typeof clone;
|
||||
cloneDeep: typeof cloneDeep;
|
||||
cloneDeepWith: typeof cloneDeepWith;
|
||||
cloneWith: typeof cloneWith;
|
||||
compact: typeof compact;
|
||||
complement: typeof complement;
|
||||
compose: typeof compose;
|
||||
concat: typeof concat;
|
||||
cond: typeof cond;
|
||||
conforms: typeof conforms;
|
||||
conformsTo: typeof conformsTo;
|
||||
constant: typeof constant;
|
||||
contains: typeof contains;
|
||||
countBy: typeof countBy;
|
||||
create: typeof create;
|
||||
curry: typeof curry;
|
||||
curryN: typeof curryN;
|
||||
curryRight: typeof curryRight;
|
||||
curryRightN: typeof curryRightN;
|
||||
debounce: typeof debounce;
|
||||
deburr: typeof deburr;
|
||||
defaults: typeof defaults;
|
||||
defaultsAll: typeof defaultsAll;
|
||||
defaultsDeep: typeof defaultsDeep;
|
||||
defaultsDeepAll: typeof defaultsDeepAll;
|
||||
defaultTo: typeof defaultTo;
|
||||
defer: typeof defer;
|
||||
delay: typeof delay;
|
||||
difference: typeof difference;
|
||||
differenceBy: typeof differenceBy;
|
||||
differenceWith: typeof differenceWith;
|
||||
dissoc: typeof dissoc;
|
||||
dissocPath: typeof dissocPath;
|
||||
divide: typeof divide;
|
||||
drop: typeof drop;
|
||||
dropLast: typeof dropLast;
|
||||
dropLastWhile: typeof dropLastWhile;
|
||||
dropRight: typeof dropRight;
|
||||
dropRightWhile: typeof dropRightWhile;
|
||||
dropWhile: typeof dropWhile;
|
||||
each: typeof each;
|
||||
eachRight: typeof eachRight;
|
||||
endsWith: typeof endsWith;
|
||||
entries: typeof entries;
|
||||
entriesIn: typeof entriesIn;
|
||||
eq: typeof eq;
|
||||
equals: typeof equals;
|
||||
escape: typeof escape;
|
||||
escapeRegExp: typeof escapeRegExp;
|
||||
every: typeof every;
|
||||
extend: typeof extend;
|
||||
extendAll: typeof extendAll;
|
||||
extendAllWith: typeof extendAllWith;
|
||||
extendWith: typeof extendWith;
|
||||
F: typeof F;
|
||||
fill: typeof fill;
|
||||
filter: typeof filter;
|
||||
find: typeof find;
|
||||
findFrom: typeof findFrom;
|
||||
findIndex: typeof findIndex;
|
||||
findIndexFrom: typeof findIndexFrom;
|
||||
findKey: typeof findKey;
|
||||
findLast: typeof findLast;
|
||||
findLastFrom: typeof findLastFrom;
|
||||
findLastIndex: typeof findLastIndex;
|
||||
findLastIndexFrom: typeof findLastIndexFrom;
|
||||
findLastKey: typeof findLastKey;
|
||||
first: typeof first;
|
||||
flatMap: typeof flatMap;
|
||||
flatMapDeep: typeof flatMapDeep;
|
||||
flatMapDepth: typeof flatMapDepth;
|
||||
flatten: typeof flatten;
|
||||
flattenDeep: typeof flattenDeep;
|
||||
flattenDepth: typeof flattenDepth;
|
||||
flip: typeof flip;
|
||||
floor: typeof floor;
|
||||
flow: typeof flow;
|
||||
flowRight: typeof flowRight;
|
||||
forEach: typeof forEach;
|
||||
forEachRight: typeof forEachRight;
|
||||
forIn: typeof forIn;
|
||||
forInRight: typeof forInRight;
|
||||
forOwn: typeof forOwn;
|
||||
forOwnRight: typeof forOwnRight;
|
||||
fromPairs: typeof fromPairs;
|
||||
functions: typeof functions;
|
||||
functionsIn: typeof functionsIn;
|
||||
get: typeof get;
|
||||
getOr: typeof getOr;
|
||||
groupBy: typeof groupBy;
|
||||
gt: typeof gt;
|
||||
gte: typeof gte;
|
||||
has: typeof has;
|
||||
hasIn: typeof hasIn;
|
||||
head: typeof head;
|
||||
identical: typeof identical;
|
||||
identity: typeof identity;
|
||||
includes: typeof includes;
|
||||
includesFrom: typeof includesFrom;
|
||||
indexBy: typeof indexBy;
|
||||
indexOf: typeof indexOf;
|
||||
indexOfFrom: typeof indexOfFrom;
|
||||
init: typeof init;
|
||||
initial: typeof initial;
|
||||
inRange: typeof inRange;
|
||||
intersection: typeof intersection;
|
||||
intersectionBy: typeof intersectionBy;
|
||||
intersectionWith: typeof intersectionWith;
|
||||
invert: typeof invert;
|
||||
invertBy: typeof invertBy;
|
||||
invertObj: typeof invertObj;
|
||||
invoke: typeof invoke;
|
||||
invokeArgs: typeof invokeArgs;
|
||||
invokeArgsMap: typeof invokeArgsMap;
|
||||
invokeMap: typeof invokeMap;
|
||||
isArguments: typeof isArguments;
|
||||
isArray: typeof isArray;
|
||||
isArrayBuffer: typeof isArrayBuffer;
|
||||
isArrayLike: typeof isArrayLike;
|
||||
isArrayLikeObject: typeof isArrayLikeObject;
|
||||
isBoolean: typeof isBoolean;
|
||||
isBuffer: typeof isBuffer;
|
||||
isDate: typeof isDate;
|
||||
isElement: typeof isElement;
|
||||
isEmpty: typeof isEmpty;
|
||||
isEqual: typeof isEqual;
|
||||
isEqualWith: typeof isEqualWith;
|
||||
isError: typeof isError;
|
||||
isFinite: typeof isFinite;
|
||||
isFunction: typeof isFunction;
|
||||
isInteger: typeof isInteger;
|
||||
isLength: typeof isLength;
|
||||
isMap: typeof isMap;
|
||||
isMatch: typeof isMatch;
|
||||
isMatchWith: typeof isMatchWith;
|
||||
isNaN: typeof isNaN;
|
||||
isNative: typeof isNative;
|
||||
isNil: typeof isNil;
|
||||
isNull: typeof isNull;
|
||||
isNumber: typeof isNumber;
|
||||
isObject: typeof isObject;
|
||||
isObjectLike: typeof isObjectLike;
|
||||
isPlainObject: typeof isPlainObject;
|
||||
isRegExp: typeof isRegExp;
|
||||
isSafeInteger: typeof isSafeInteger;
|
||||
isSet: typeof isSet;
|
||||
isString: typeof isString;
|
||||
isSymbol: typeof isSymbol;
|
||||
isTypedArray: typeof isTypedArray;
|
||||
isUndefined: typeof isUndefined;
|
||||
isWeakMap: typeof isWeakMap;
|
||||
isWeakSet: typeof isWeakSet;
|
||||
iteratee: typeof iteratee;
|
||||
join: typeof join;
|
||||
juxt: typeof juxt;
|
||||
kebabCase: typeof kebabCase;
|
||||
keyBy: typeof keyBy;
|
||||
keys: typeof keys;
|
||||
keysIn: typeof keysIn;
|
||||
last: typeof last;
|
||||
lastIndexOf: typeof lastIndexOf;
|
||||
lastIndexOfFrom: typeof lastIndexOfFrom;
|
||||
lowerCase: typeof lowerCase;
|
||||
lowerFirst: typeof lowerFirst;
|
||||
lt: typeof lt;
|
||||
lte: typeof lte;
|
||||
map: typeof map;
|
||||
mapKeys: typeof mapKeys;
|
||||
mapValues: typeof mapValues;
|
||||
matches: typeof matches;
|
||||
matchesProperty: typeof matchesProperty;
|
||||
max: typeof max;
|
||||
maxBy: typeof maxBy;
|
||||
mean: typeof mean;
|
||||
meanBy: typeof meanBy;
|
||||
memoize: typeof memoize;
|
||||
merge: typeof merge;
|
||||
mergeAll: typeof mergeAll;
|
||||
mergeAllWith: typeof mergeAllWith;
|
||||
mergeWith: typeof mergeWith;
|
||||
method: typeof method;
|
||||
methodOf: typeof methodOf;
|
||||
min: typeof min;
|
||||
minBy: typeof minBy;
|
||||
multiply: typeof multiply;
|
||||
nAry: typeof nAry;
|
||||
negate: typeof negate;
|
||||
noConflict: typeof noConflict;
|
||||
noop: typeof noop;
|
||||
now: typeof now;
|
||||
nth: typeof nth;
|
||||
nthArg: typeof nthArg;
|
||||
omit: typeof omit;
|
||||
omitAll: typeof omitAll;
|
||||
omitBy: typeof omitBy;
|
||||
once: typeof once;
|
||||
orderBy: typeof orderBy;
|
||||
over: typeof over;
|
||||
overArgs: typeof overArgs;
|
||||
overEvery: typeof overEvery;
|
||||
overSome: typeof overSome;
|
||||
pad: typeof pad;
|
||||
padChars: typeof padChars;
|
||||
padCharsEnd: typeof padCharsEnd;
|
||||
padCharsStart: typeof padCharsStart;
|
||||
padEnd: typeof padEnd;
|
||||
padStart: typeof padStart;
|
||||
parseInt: typeof parseInt;
|
||||
partial: typeof partial;
|
||||
partialRight: typeof partialRight;
|
||||
partition: typeof partition;
|
||||
path: typeof path;
|
||||
pathEq: typeof pathEq;
|
||||
pathOr: typeof pathOr;
|
||||
paths: typeof paths;
|
||||
pick: typeof pick;
|
||||
pickAll: typeof pickAll;
|
||||
pickBy: typeof pickBy;
|
||||
pipe: typeof pipe;
|
||||
pluck: typeof pluck;
|
||||
prop: typeof prop;
|
||||
propEq: typeof propEq;
|
||||
property: typeof property;
|
||||
propertyOf: typeof propertyOf;
|
||||
propOr: typeof propOr;
|
||||
props: typeof props;
|
||||
pull: typeof pull;
|
||||
pullAll: typeof pullAll;
|
||||
pullAllBy: typeof pullAllBy;
|
||||
pullAllWith: typeof pullAllWith;
|
||||
pullAt: typeof pullAt;
|
||||
random: typeof random;
|
||||
range: typeof range;
|
||||
rangeRight: typeof rangeRight;
|
||||
rangeStep: typeof rangeStep;
|
||||
rangeStepRight: typeof rangeStepRight;
|
||||
rearg: typeof rearg;
|
||||
reduce: typeof reduce;
|
||||
reduceRight: typeof reduceRight;
|
||||
reject: typeof reject;
|
||||
remove: typeof remove;
|
||||
repeat: typeof repeat;
|
||||
replace: typeof replace;
|
||||
rest: typeof rest;
|
||||
restFrom: typeof restFrom;
|
||||
result: typeof result;
|
||||
reverse: typeof reverse;
|
||||
round: typeof round;
|
||||
runInContext: typeof runInContext;
|
||||
sample: typeof sample;
|
||||
sampleSize: typeof sampleSize;
|
||||
set: typeof set;
|
||||
setWith: typeof setWith;
|
||||
shuffle: typeof shuffle;
|
||||
size: typeof size;
|
||||
slice: typeof slice;
|
||||
snakeCase: typeof snakeCase;
|
||||
some: typeof some;
|
||||
sortBy: typeof sortBy;
|
||||
sortedIndex: typeof sortedIndex;
|
||||
sortedIndexBy: typeof sortedIndexBy;
|
||||
sortedIndexOf: typeof sortedIndexOf;
|
||||
sortedLastIndex: typeof sortedLastIndex;
|
||||
sortedLastIndexBy: typeof sortedLastIndexBy;
|
||||
sortedLastIndexOf: typeof sortedLastIndexOf;
|
||||
sortedUniq: typeof sortedUniq;
|
||||
sortedUniqBy: typeof sortedUniqBy;
|
||||
split: typeof split;
|
||||
spread: typeof spread;
|
||||
spreadFrom: typeof spreadFrom;
|
||||
startCase: typeof startCase;
|
||||
startsWith: typeof startsWith;
|
||||
stubArray: typeof stubArray;
|
||||
stubFalse: typeof stubFalse;
|
||||
stubObject: typeof stubObject;
|
||||
stubString: typeof stubString;
|
||||
stubTrue: typeof stubTrue;
|
||||
subtract: typeof subtract;
|
||||
sum: typeof sum;
|
||||
sumBy: typeof sumBy;
|
||||
symmetricDifference: typeof symmetricDifference;
|
||||
symmetricDifferenceBy: typeof symmetricDifferenceBy;
|
||||
symmetricDifferenceWith: typeof symmetricDifferenceWith;
|
||||
T: typeof T;
|
||||
tail: typeof tail;
|
||||
take: typeof take;
|
||||
takeLast: typeof takeLast;
|
||||
takeLastWhile: typeof takeLastWhile;
|
||||
takeRight: typeof takeRight;
|
||||
takeRightWhile: typeof takeRightWhile;
|
||||
takeWhile: typeof takeWhile;
|
||||
tap: typeof tap;
|
||||
template: typeof template;
|
||||
throttle: typeof throttle;
|
||||
thru: typeof thru;
|
||||
times: typeof times;
|
||||
toArray: typeof toArray;
|
||||
toFinite: typeof toFinite;
|
||||
toInteger: typeof toInteger;
|
||||
toLength: typeof toLength;
|
||||
toLower: typeof toLower;
|
||||
toNumber: typeof toNumber;
|
||||
toPairs: typeof toPairs;
|
||||
toPairsIn: typeof toPairsIn;
|
||||
toPath: typeof toPath;
|
||||
toPlainObject: typeof toPlainObject;
|
||||
toSafeInteger: typeof toSafeInteger;
|
||||
toString: typeof toString;
|
||||
toUpper: typeof toUpper;
|
||||
transform: typeof transform;
|
||||
trim: typeof trim;
|
||||
trimChars: typeof trimChars;
|
||||
trimCharsEnd: typeof trimCharsEnd;
|
||||
trimCharsStart: typeof trimCharsStart;
|
||||
trimEnd: typeof trimEnd;
|
||||
trimStart: typeof trimStart;
|
||||
truncate: typeof truncate;
|
||||
unapply: typeof unapply;
|
||||
unary: typeof unary;
|
||||
unescape: typeof unescape;
|
||||
union: typeof union;
|
||||
unionBy: typeof unionBy;
|
||||
unionWith: typeof unionWith;
|
||||
uniq: typeof uniq;
|
||||
uniqBy: typeof uniqBy;
|
||||
uniqueId: typeof uniqueId;
|
||||
uniqWith: typeof uniqWith;
|
||||
unnest: typeof unnest;
|
||||
unset: typeof unset;
|
||||
unzip: typeof unzip;
|
||||
unzipWith: typeof unzipWith;
|
||||
update: typeof update;
|
||||
updateWith: typeof updateWith;
|
||||
upperCase: typeof upperCase;
|
||||
upperFirst: typeof upperFirst;
|
||||
useWith: typeof useWith;
|
||||
values: typeof values;
|
||||
valuesIn: typeof valuesIn;
|
||||
where: typeof where;
|
||||
whereEq: typeof whereEq;
|
||||
without: typeof without;
|
||||
words: typeof words;
|
||||
wrap: typeof wrap;
|
||||
xor: typeof xor;
|
||||
xorBy: typeof xorBy;
|
||||
xorWith: typeof xorWith;
|
||||
zip: typeof zip;
|
||||
zipAll: typeof zipAll;
|
||||
zipObj: typeof zipObj;
|
||||
zipObject: typeof zipObject;
|
||||
zipObjectDeep: typeof zipObjectDeep;
|
||||
zipWith: typeof zipWith;
|
||||
}
|
||||
}
|
||||
|
||||
// Backward compatibility with --target es5
|
||||
declare global {
|
||||
// tslint:disable-next-line:no-empty-interface
|
||||
interface Set<T> { }
|
||||
// tslint:disable-next-line:no-empty-interface
|
||||
interface Map<K, V> { }
|
||||
// tslint:disable-next-line:no-empty-interface
|
||||
interface WeakSet<T> { }
|
||||
// tslint:disable-next-line:no-empty-interface
|
||||
interface WeakMap<K extends object, V> { }
|
||||
}
|
||||
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
// AUTO-GENERATED: do not modify this file directly.
|
||||
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
|
||||
// npm run fp
|
||||
|
||||
type StubFalse =
|
||||
/**
|
||||
* This method returns `false`.
|
||||
*
|
||||
* @returns Returns `false`.
|
||||
*/
|
||||
() => boolean;
|
||||
|
||||
declare const F: StubFalse;
|
||||
export = F;
|
||||
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
// AUTO-GENERATED: do not modify this file directly.
|
||||
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
|
||||
// npm run fp
|
||||
|
||||
type StubTrue =
|
||||
/**
|
||||
* This method returns `true`.
|
||||
*
|
||||
* @returns Returns `true`.
|
||||
*/
|
||||
() => boolean;
|
||||
|
||||
declare const T: StubTrue;
|
||||
export = T;
|
||||
Vendored
+51
@@ -0,0 +1,51 @@
|
||||
// AUTO-GENERATED: do not modify this file directly.
|
||||
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
|
||||
// npm run fp
|
||||
|
||||
interface Add {
|
||||
/**
|
||||
* Adds two numbers.
|
||||
*
|
||||
* @param augend The first number to add.
|
||||
* @param addend The second number to add.
|
||||
* @return Returns the sum.
|
||||
*/
|
||||
(): Add;
|
||||
/**
|
||||
* Adds two numbers.
|
||||
*
|
||||
* @param augend The first number to add.
|
||||
* @param addend The second number to add.
|
||||
* @return Returns the sum.
|
||||
*/
|
||||
(augend: number): Add1x1;
|
||||
/**
|
||||
* Adds two numbers.
|
||||
*
|
||||
* @param augend The first number to add.
|
||||
* @param addend The second number to add.
|
||||
* @return Returns the sum.
|
||||
*/
|
||||
(augend: number, addend: number): number;
|
||||
}
|
||||
interface Add1x1 {
|
||||
/**
|
||||
* Adds two numbers.
|
||||
*
|
||||
* @param augend The first number to add.
|
||||
* @param addend The second number to add.
|
||||
* @return Returns the sum.
|
||||
*/
|
||||
(): Add1x1;
|
||||
/**
|
||||
* Adds two numbers.
|
||||
*
|
||||
* @param augend The first number to add.
|
||||
* @param addend The second number to add.
|
||||
* @return Returns the sum.
|
||||
*/
|
||||
(addend: number): number;
|
||||
}
|
||||
|
||||
declare const add: Add;
|
||||
export = add;
|
||||
Vendored
+51
@@ -0,0 +1,51 @@
|
||||
// AUTO-GENERATED: do not modify this file directly.
|
||||
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
|
||||
// npm run fp
|
||||
|
||||
interface After {
|
||||
/**
|
||||
* The opposite of _.before; this method creates a function that invokes func once it’s called n or more times.
|
||||
*
|
||||
* @param n The number of calls before func is invoked.
|
||||
* @param func The function to restrict.
|
||||
* @return Returns the new restricted function.
|
||||
*/
|
||||
(): After;
|
||||
/**
|
||||
* The opposite of _.before; this method creates a function that invokes func once it’s called n or more times.
|
||||
*
|
||||
* @param n The number of calls before func is invoked.
|
||||
* @param func The function to restrict.
|
||||
* @return Returns the new restricted function.
|
||||
*/
|
||||
<TFunc extends (...args: any[]) => any>(func: TFunc): After1x1<TFunc>;
|
||||
/**
|
||||
* The opposite of _.before; this method creates a function that invokes func once it’s called n or more times.
|
||||
*
|
||||
* @param n The number of calls before func is invoked.
|
||||
* @param func The function to restrict.
|
||||
* @return Returns the new restricted function.
|
||||
*/
|
||||
<TFunc extends (...args: any[]) => any>(func: TFunc, n: number): TFunc;
|
||||
}
|
||||
interface After1x1<TFunc extends (...args: any[]) => any> {
|
||||
/**
|
||||
* The opposite of _.before; this method creates a function that invokes func once it’s called n or more times.
|
||||
*
|
||||
* @param n The number of calls before func is invoked.
|
||||
* @param func The function to restrict.
|
||||
* @return Returns the new restricted function.
|
||||
*/
|
||||
(): After1x1<TFunc>;
|
||||
/**
|
||||
* The opposite of _.before; this method creates a function that invokes func once it’s called n or more times.
|
||||
*
|
||||
* @param n The number of calls before func is invoked.
|
||||
* @param func The function to restrict.
|
||||
* @return Returns the new restricted function.
|
||||
*/
|
||||
(n: number): TFunc;
|
||||
}
|
||||
|
||||
declare const after: After;
|
||||
export = after;
|
||||
Vendored
+67
@@ -0,0 +1,67 @@
|
||||
// AUTO-GENERATED: do not modify this file directly.
|
||||
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
|
||||
// npm run fp
|
||||
|
||||
import _ = require("../index");
|
||||
|
||||
interface Every {
|
||||
/**
|
||||
* Checks if predicate returns truthy for all elements of collection. Iteration is stopped once predicate
|
||||
* returns falsey. The predicate is invoked with three arguments: (value, index|key, collection).
|
||||
*
|
||||
* @param collection The collection to iterate over.
|
||||
* @param predicate The function invoked per iteration.
|
||||
* @return Returns true if all elements pass the predicate check, else false.
|
||||
*/
|
||||
(): Every;
|
||||
/**
|
||||
* Checks if predicate returns truthy for all elements of collection. Iteration is stopped once predicate
|
||||
* returns falsey. The predicate is invoked with three arguments: (value, index|key, collection).
|
||||
*
|
||||
* @param collection The collection to iterate over.
|
||||
* @param predicate The function invoked per iteration.
|
||||
* @return Returns true if all elements pass the predicate check, else false.
|
||||
*/
|
||||
<T>(predicate: _.ValueIterateeCustom<T, boolean>): Every1x1<T>;
|
||||
/**
|
||||
* Checks if predicate returns truthy for all elements of collection. Iteration is stopped once predicate
|
||||
* returns falsey. The predicate is invoked with three arguments: (value, index|key, collection).
|
||||
*
|
||||
* @param collection The collection to iterate over.
|
||||
* @param predicate The function invoked per iteration.
|
||||
* @return Returns true if all elements pass the predicate check, else false.
|
||||
*/
|
||||
<T>(predicate: _.ValueIterateeCustom<T, boolean>, collection: _.List<T> | null | undefined): boolean;
|
||||
/**
|
||||
* Checks if predicate returns truthy for all elements of collection. Iteration is stopped once predicate
|
||||
* returns falsey. The predicate is invoked with three arguments: (value, index|key, collection).
|
||||
*
|
||||
* @param collection The collection to iterate over.
|
||||
* @param predicate The function invoked per iteration.
|
||||
* @return Returns true if all elements pass the predicate check, else false.
|
||||
*/
|
||||
<T extends object>(predicate: _.ValueIterateeCustom<T[keyof T], boolean>, collection: T | null | undefined): boolean;
|
||||
}
|
||||
interface Every1x1<T> {
|
||||
/**
|
||||
* Checks if predicate returns truthy for all elements of collection. Iteration is stopped once predicate
|
||||
* returns falsey. The predicate is invoked with three arguments: (value, index|key, collection).
|
||||
*
|
||||
* @param collection The collection to iterate over.
|
||||
* @param predicate The function invoked per iteration.
|
||||
* @return Returns true if all elements pass the predicate check, else false.
|
||||
*/
|
||||
(): Every1x1<T>;
|
||||
/**
|
||||
* Checks if predicate returns truthy for all elements of collection. Iteration is stopped once predicate
|
||||
* returns falsey. The predicate is invoked with three arguments: (value, index|key, collection).
|
||||
*
|
||||
* @param collection The collection to iterate over.
|
||||
* @param predicate The function invoked per iteration.
|
||||
* @return Returns true if all elements pass the predicate check, else false.
|
||||
*/
|
||||
(collection: _.List<T> | object | null | undefined): boolean;
|
||||
}
|
||||
|
||||
declare const all: Every;
|
||||
export = all;
|
||||
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
// AUTO-GENERATED: do not modify this file directly.
|
||||
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
|
||||
// npm run fp
|
||||
|
||||
import _ = require("../index");
|
||||
|
||||
type OverEvery =
|
||||
/**
|
||||
* Creates a function that checks if all of the predicates return truthy when invoked with the arguments
|
||||
* provided to the created function.
|
||||
*
|
||||
* @param predicates The predicates to check.
|
||||
* @return Returns the new function.
|
||||
*/
|
||||
<T>(predicates: _.Many<(...args: T[]) => boolean>) => (...args: T[]) => boolean;
|
||||
|
||||
declare const allPass: OverEvery;
|
||||
export = allPass;
|
||||
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
// AUTO-GENERATED: do not modify this file directly.
|
||||
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
|
||||
// npm run fp
|
||||
|
||||
type Constant =
|
||||
/**
|
||||
* Creates a function that returns value.
|
||||
*
|
||||
* @param value The value to return from the new function.
|
||||
* @return Returns the new function.
|
||||
*/
|
||||
<T>(value: T) => () => T;
|
||||
|
||||
declare const always: Constant;
|
||||
export = always;
|
||||
Vendored
+67
@@ -0,0 +1,67 @@
|
||||
// AUTO-GENERATED: do not modify this file directly.
|
||||
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
|
||||
// npm run fp
|
||||
|
||||
import _ = require("../index");
|
||||
|
||||
interface Some {
|
||||
/**
|
||||
* Checks if predicate returns truthy for any element of collection. Iteration is stopped once predicate
|
||||
* returns truthy. The predicate is invoked with three arguments: (value, index|key, collection).
|
||||
*
|
||||
* @param collection The collection to iterate over.
|
||||
* @param predicate The function invoked per iteration.
|
||||
* @return Returns true if any element passes the predicate check, else false.
|
||||
*/
|
||||
(): Some;
|
||||
/**
|
||||
* Checks if predicate returns truthy for any element of collection. Iteration is stopped once predicate
|
||||
* returns truthy. The predicate is invoked with three arguments: (value, index|key, collection).
|
||||
*
|
||||
* @param collection The collection to iterate over.
|
||||
* @param predicate The function invoked per iteration.
|
||||
* @return Returns true if any element passes the predicate check, else false.
|
||||
*/
|
||||
<T>(predicate: _.ValueIterateeCustom<T, boolean>): Some1x1<T>;
|
||||
/**
|
||||
* Checks if predicate returns truthy for any element of collection. Iteration is stopped once predicate
|
||||
* returns truthy. The predicate is invoked with three arguments: (value, index|key, collection).
|
||||
*
|
||||
* @param collection The collection to iterate over.
|
||||
* @param predicate The function invoked per iteration.
|
||||
* @return Returns true if any element passes the predicate check, else false.
|
||||
*/
|
||||
<T>(predicate: _.ValueIterateeCustom<T, boolean>, collection: _.List<T> | null | undefined): boolean;
|
||||
/**
|
||||
* Checks if predicate returns truthy for any element of collection. Iteration is stopped once predicate
|
||||
* returns truthy. The predicate is invoked with three arguments: (value, index|key, collection).
|
||||
*
|
||||
* @param collection The collection to iterate over.
|
||||
* @param predicate The function invoked per iteration.
|
||||
* @return Returns true if any element passes the predicate check, else false.
|
||||
*/
|
||||
<T extends object>(predicate: _.ValueIterateeCustom<T[keyof T], boolean>, collection: T | null | undefined): boolean;
|
||||
}
|
||||
interface Some1x1<T> {
|
||||
/**
|
||||
* Checks if predicate returns truthy for any element of collection. Iteration is stopped once predicate
|
||||
* returns truthy. The predicate is invoked with three arguments: (value, index|key, collection).
|
||||
*
|
||||
* @param collection The collection to iterate over.
|
||||
* @param predicate The function invoked per iteration.
|
||||
* @return Returns true if any element passes the predicate check, else false.
|
||||
*/
|
||||
(): Some1x1<T>;
|
||||
/**
|
||||
* Checks if predicate returns truthy for any element of collection. Iteration is stopped once predicate
|
||||
* returns truthy. The predicate is invoked with three arguments: (value, index|key, collection).
|
||||
*
|
||||
* @param collection The collection to iterate over.
|
||||
* @param predicate The function invoked per iteration.
|
||||
* @return Returns true if any element passes the predicate check, else false.
|
||||
*/
|
||||
(collection: _.List<T> | object | null | undefined): boolean;
|
||||
}
|
||||
|
||||
declare const any: Some;
|
||||
export = any;
|
||||
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
// AUTO-GENERATED: do not modify this file directly.
|
||||
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
|
||||
// npm run fp
|
||||
|
||||
import _ = require("../index");
|
||||
|
||||
type OverSome =
|
||||
/**
|
||||
* Creates a function that checks if any of the predicates return truthy when invoked with the arguments
|
||||
* provided to the created function.
|
||||
*
|
||||
* @param predicates The predicates to check.
|
||||
* @return Returns the new function.
|
||||
*/
|
||||
<T>(predicates: _.Many<(...args: T[]) => boolean>) => (...args: T[]) => boolean;
|
||||
|
||||
declare const anyPass: OverSome;
|
||||
export = anyPass;
|
||||
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
// AUTO-GENERATED: do not modify this file directly.
|
||||
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
|
||||
// npm run fp
|
||||
|
||||
type Spread =
|
||||
/**
|
||||
* Creates a function that invokes func with the this binding of the created function and an array of arguments
|
||||
* much like Function#apply.
|
||||
*
|
||||
* Note: This method is based on the spread operator.
|
||||
*
|
||||
* @param func The function to spread arguments over.
|
||||
* @return Returns the new function.
|
||||
*/
|
||||
<TResult>(func: (...args: any[]) => TResult) => (...args: any[]) => TResult;
|
||||
|
||||
declare const apply: Spread;
|
||||
export = apply;
|
||||
Vendored
+51
@@ -0,0 +1,51 @@
|
||||
// AUTO-GENERATED: do not modify this file directly.
|
||||
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
|
||||
// npm run fp
|
||||
|
||||
interface Ary {
|
||||
/**
|
||||
* Creates a function that accepts up to n arguments ignoring any additional arguments.
|
||||
*
|
||||
* @param func The function to cap arguments for.
|
||||
* @param n The arity cap.
|
||||
* @returns Returns the new function.
|
||||
*/
|
||||
(): Ary;
|
||||
/**
|
||||
* Creates a function that accepts up to n arguments ignoring any additional arguments.
|
||||
*
|
||||
* @param func The function to cap arguments for.
|
||||
* @param n The arity cap.
|
||||
* @returns Returns the new function.
|
||||
*/
|
||||
(n: number): Ary1x1;
|
||||
/**
|
||||
* Creates a function that accepts up to n arguments ignoring any additional arguments.
|
||||
*
|
||||
* @param func The function to cap arguments for.
|
||||
* @param n The arity cap.
|
||||
* @returns Returns the new function.
|
||||
*/
|
||||
(n: number, func: (...args: any[]) => any): (...args: any[]) => any;
|
||||
}
|
||||
interface Ary1x1 {
|
||||
/**
|
||||
* Creates a function that accepts up to n arguments ignoring any additional arguments.
|
||||
*
|
||||
* @param func The function to cap arguments for.
|
||||
* @param n The arity cap.
|
||||
* @returns Returns the new function.
|
||||
*/
|
||||
(): Ary1x1;
|
||||
/**
|
||||
* Creates a function that accepts up to n arguments ignoring any additional arguments.
|
||||
*
|
||||
* @param func The function to cap arguments for.
|
||||
* @param n The arity cap.
|
||||
* @returns Returns the new function.
|
||||
*/
|
||||
(func: (...args: any[]) => any): (...args: any[]) => any;
|
||||
}
|
||||
|
||||
declare const ary: Ary;
|
||||
export = ary;
|
||||
Vendored
+156
@@ -0,0 +1,156 @@
|
||||
// AUTO-GENERATED: do not modify this file directly.
|
||||
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
|
||||
// npm run fp
|
||||
|
||||
interface Assign {
|
||||
/**
|
||||
* Assigns own enumerable properties of source objects to the destination
|
||||
* object. Source objects are applied from left to right. Subsequent sources
|
||||
* overwrite property assignments of previous sources.
|
||||
*
|
||||
* **Note:** This method mutates `object` and is loosely based on
|
||||
* [`Object.assign`](https://mdn.io/Object/assign).
|
||||
*
|
||||
* @category Object
|
||||
* @param object The destination object.
|
||||
* @param [sources] The source objects.
|
||||
* @returns Returns `object`.
|
||||
* @example
|
||||
*
|
||||
* function Foo() {
|
||||
* this.c = 3;
|
||||
* }
|
||||
*
|
||||
* function Bar() {
|
||||
* this.e = 5;
|
||||
* }
|
||||
*
|
||||
* Foo.prototype.d = 4;
|
||||
* Bar.prototype.f = 6;
|
||||
*
|
||||
* _.assign({ 'a': 1 }, new Foo, new Bar);
|
||||
* // => { 'a': 1, 'c': 3, 'e': 5 }
|
||||
*/
|
||||
(): Assign;
|
||||
/**
|
||||
* Assigns own enumerable properties of source objects to the destination
|
||||
* object. Source objects are applied from left to right. Subsequent sources
|
||||
* overwrite property assignments of previous sources.
|
||||
*
|
||||
* **Note:** This method mutates `object` and is loosely based on
|
||||
* [`Object.assign`](https://mdn.io/Object/assign).
|
||||
*
|
||||
* @category Object
|
||||
* @param object The destination object.
|
||||
* @param [sources] The source objects.
|
||||
* @returns Returns `object`.
|
||||
* @example
|
||||
*
|
||||
* function Foo() {
|
||||
* this.c = 3;
|
||||
* }
|
||||
*
|
||||
* function Bar() {
|
||||
* this.e = 5;
|
||||
* }
|
||||
*
|
||||
* Foo.prototype.d = 4;
|
||||
* Bar.prototype.f = 6;
|
||||
*
|
||||
* _.assign({ 'a': 1 }, new Foo, new Bar);
|
||||
* // => { 'a': 1, 'c': 3, 'e': 5 }
|
||||
*/
|
||||
<TObject>(object: TObject): Assign1x1<TObject>;
|
||||
/**
|
||||
* Assigns own enumerable properties of source objects to the destination
|
||||
* object. Source objects are applied from left to right. Subsequent sources
|
||||
* overwrite property assignments of previous sources.
|
||||
*
|
||||
* **Note:** This method mutates `object` and is loosely based on
|
||||
* [`Object.assign`](https://mdn.io/Object/assign).
|
||||
*
|
||||
* @category Object
|
||||
* @param object The destination object.
|
||||
* @param [sources] The source objects.
|
||||
* @returns Returns `object`.
|
||||
* @example
|
||||
*
|
||||
* function Foo() {
|
||||
* this.c = 3;
|
||||
* }
|
||||
*
|
||||
* function Bar() {
|
||||
* this.e = 5;
|
||||
* }
|
||||
*
|
||||
* Foo.prototype.d = 4;
|
||||
* Bar.prototype.f = 6;
|
||||
*
|
||||
* _.assign({ 'a': 1 }, new Foo, new Bar);
|
||||
* // => { 'a': 1, 'c': 3, 'e': 5 }
|
||||
*/
|
||||
<TObject, TSource>(object: TObject, source: TSource): TObject & TSource;
|
||||
}
|
||||
interface Assign1x1<TObject> {
|
||||
/**
|
||||
* Assigns own enumerable properties of source objects to the destination
|
||||
* object. Source objects are applied from left to right. Subsequent sources
|
||||
* overwrite property assignments of previous sources.
|
||||
*
|
||||
* **Note:** This method mutates `object` and is loosely based on
|
||||
* [`Object.assign`](https://mdn.io/Object/assign).
|
||||
*
|
||||
* @category Object
|
||||
* @param object The destination object.
|
||||
* @param [sources] The source objects.
|
||||
* @returns Returns `object`.
|
||||
* @example
|
||||
*
|
||||
* function Foo() {
|
||||
* this.c = 3;
|
||||
* }
|
||||
*
|
||||
* function Bar() {
|
||||
* this.e = 5;
|
||||
* }
|
||||
*
|
||||
* Foo.prototype.d = 4;
|
||||
* Bar.prototype.f = 6;
|
||||
*
|
||||
* _.assign({ 'a': 1 }, new Foo, new Bar);
|
||||
* // => { 'a': 1, 'c': 3, 'e': 5 }
|
||||
*/
|
||||
(): Assign1x1<TObject>;
|
||||
/**
|
||||
* Assigns own enumerable properties of source objects to the destination
|
||||
* object. Source objects are applied from left to right. Subsequent sources
|
||||
* overwrite property assignments of previous sources.
|
||||
*
|
||||
* **Note:** This method mutates `object` and is loosely based on
|
||||
* [`Object.assign`](https://mdn.io/Object/assign).
|
||||
*
|
||||
* @category Object
|
||||
* @param object The destination object.
|
||||
* @param [sources] The source objects.
|
||||
* @returns Returns `object`.
|
||||
* @example
|
||||
*
|
||||
* function Foo() {
|
||||
* this.c = 3;
|
||||
* }
|
||||
*
|
||||
* function Bar() {
|
||||
* this.e = 5;
|
||||
* }
|
||||
*
|
||||
* Foo.prototype.d = 4;
|
||||
* Bar.prototype.f = 6;
|
||||
*
|
||||
* _.assign({ 'a': 1 }, new Foo, new Bar);
|
||||
* // => { 'a': 1, 'c': 3, 'e': 5 }
|
||||
*/
|
||||
<TSource>(source: TSource): TObject & TSource;
|
||||
}
|
||||
|
||||
declare const assign: Assign;
|
||||
export = assign;
|
||||
Vendored
+37
@@ -0,0 +1,37 @@
|
||||
// AUTO-GENERATED: do not modify this file directly.
|
||||
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
|
||||
// npm run fp
|
||||
|
||||
type Assign =
|
||||
/**
|
||||
* Assigns own enumerable properties of source objects to the destination
|
||||
* object. Source objects are applied from left to right. Subsequent sources
|
||||
* overwrite property assignments of previous sources.
|
||||
*
|
||||
* **Note:** This method mutates `object` and is loosely based on
|
||||
* [`Object.assign`](https://mdn.io/Object/assign).
|
||||
*
|
||||
* @category Object
|
||||
* @param object The destination object.
|
||||
* @param [sources] The source objects.
|
||||
* @returns Returns `object`.
|
||||
* @example
|
||||
*
|
||||
* function Foo() {
|
||||
* this.c = 3;
|
||||
* }
|
||||
*
|
||||
* function Bar() {
|
||||
* this.e = 5;
|
||||
* }
|
||||
*
|
||||
* Foo.prototype.d = 4;
|
||||
* Bar.prototype.f = 6;
|
||||
*
|
||||
* _.assign({ 'a': 1 }, new Foo, new Bar);
|
||||
* // => { 'a': 1, 'c': 3, 'e': 5 }
|
||||
*/
|
||||
(object: ReadonlyArray<any>) => any;
|
||||
|
||||
declare const assignAll: Assign;
|
||||
export = assignAll;
|
||||
Vendored
+138
@@ -0,0 +1,138 @@
|
||||
// AUTO-GENERATED: do not modify this file directly.
|
||||
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
|
||||
// npm run fp
|
||||
|
||||
import _ = require("../index");
|
||||
|
||||
interface AssignWith {
|
||||
/**
|
||||
* This method is like `_.assign` except that it accepts `customizer` which
|
||||
* is invoked to produce the assigned values. If `customizer` returns `undefined`
|
||||
* assignment is handled by the method instead. The `customizer` is invoked
|
||||
* with five arguments: (objValue, srcValue, key, object, source).
|
||||
*
|
||||
* **Note:** This method mutates `object`.
|
||||
*
|
||||
* @category Object
|
||||
* @param object The destination object.
|
||||
* @param sources The source objects.
|
||||
* @param [customizer] The function to customize assigned values.
|
||||
* @returns Returns `object`.
|
||||
* @example
|
||||
*
|
||||
* function customizer(objValue, srcValue) {
|
||||
* return _.isUndefined(objValue) ? srcValue : objValue;
|
||||
* }
|
||||
*
|
||||
* var defaults = _.partialRight(_.assignWith, customizer);
|
||||
*
|
||||
* defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
|
||||
* // => { 'a': 1, 'b': 2 }
|
||||
*/
|
||||
(): AssignWith;
|
||||
/**
|
||||
* This method is like `_.assign` except that it accepts `customizer` which
|
||||
* is invoked to produce the assigned values. If `customizer` returns `undefined`
|
||||
* assignment is handled by the method instead. The `customizer` is invoked
|
||||
* with five arguments: (objValue, srcValue, key, object, source).
|
||||
*
|
||||
* **Note:** This method mutates `object`.
|
||||
*
|
||||
* @category Object
|
||||
* @param object The destination object.
|
||||
* @param sources The source objects.
|
||||
* @param [customizer] The function to customize assigned values.
|
||||
* @returns Returns `object`.
|
||||
* @example
|
||||
*
|
||||
* function customizer(objValue, srcValue) {
|
||||
* return _.isUndefined(objValue) ? srcValue : objValue;
|
||||
* }
|
||||
*
|
||||
* var defaults = _.partialRight(_.assignWith, customizer);
|
||||
*
|
||||
* defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
|
||||
* // => { 'a': 1, 'b': 2 }
|
||||
*/
|
||||
(customizer: _.AssignCustomizer): AssignWith1x1;
|
||||
/**
|
||||
* This method is like `_.assign` except that it accepts `customizer` which
|
||||
* is invoked to produce the assigned values. If `customizer` returns `undefined`
|
||||
* assignment is handled by the method instead. The `customizer` is invoked
|
||||
* with five arguments: (objValue, srcValue, key, object, source).
|
||||
*
|
||||
* **Note:** This method mutates `object`.
|
||||
*
|
||||
* @category Object
|
||||
* @param object The destination object.
|
||||
* @param sources The source objects.
|
||||
* @param [customizer] The function to customize assigned values.
|
||||
* @returns Returns `object`.
|
||||
* @example
|
||||
*
|
||||
* function customizer(objValue, srcValue) {
|
||||
* return _.isUndefined(objValue) ? srcValue : objValue;
|
||||
* }
|
||||
*
|
||||
* var defaults = _.partialRight(_.assignWith, customizer);
|
||||
*
|
||||
* defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
|
||||
* // => { 'a': 1, 'b': 2 }
|
||||
*/
|
||||
(customizer: _.AssignCustomizer, args: ReadonlyArray<any>): any;
|
||||
}
|
||||
interface AssignWith1x1 {
|
||||
/**
|
||||
* This method is like `_.assign` except that it accepts `customizer` which
|
||||
* is invoked to produce the assigned values. If `customizer` returns `undefined`
|
||||
* assignment is handled by the method instead. The `customizer` is invoked
|
||||
* with five arguments: (objValue, srcValue, key, object, source).
|
||||
*
|
||||
* **Note:** This method mutates `object`.
|
||||
*
|
||||
* @category Object
|
||||
* @param object The destination object.
|
||||
* @param sources The source objects.
|
||||
* @param [customizer] The function to customize assigned values.
|
||||
* @returns Returns `object`.
|
||||
* @example
|
||||
*
|
||||
* function customizer(objValue, srcValue) {
|
||||
* return _.isUndefined(objValue) ? srcValue : objValue;
|
||||
* }
|
||||
*
|
||||
* var defaults = _.partialRight(_.assignWith, customizer);
|
||||
*
|
||||
* defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
|
||||
* // => { 'a': 1, 'b': 2 }
|
||||
*/
|
||||
(): AssignWith1x1;
|
||||
/**
|
||||
* This method is like `_.assign` except that it accepts `customizer` which
|
||||
* is invoked to produce the assigned values. If `customizer` returns `undefined`
|
||||
* assignment is handled by the method instead. The `customizer` is invoked
|
||||
* with five arguments: (objValue, srcValue, key, object, source).
|
||||
*
|
||||
* **Note:** This method mutates `object`.
|
||||
*
|
||||
* @category Object
|
||||
* @param object The destination object.
|
||||
* @param sources The source objects.
|
||||
* @param [customizer] The function to customize assigned values.
|
||||
* @returns Returns `object`.
|
||||
* @example
|
||||
*
|
||||
* function customizer(objValue, srcValue) {
|
||||
* return _.isUndefined(objValue) ? srcValue : objValue;
|
||||
* }
|
||||
*
|
||||
* var defaults = _.partialRight(_.assignWith, customizer);
|
||||
*
|
||||
* defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
|
||||
* // => { 'a': 1, 'b': 2 }
|
||||
*/
|
||||
(args: ReadonlyArray<any>): any;
|
||||
}
|
||||
|
||||
declare const assignAllWith: AssignWith;
|
||||
export = assignAllWith;
|
||||
Vendored
+151
@@ -0,0 +1,151 @@
|
||||
// AUTO-GENERATED: do not modify this file directly.
|
||||
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
|
||||
// npm run fp
|
||||
|
||||
interface AssignIn {
|
||||
/**
|
||||
* This method is like `_.assign` except that it iterates over own and
|
||||
* inherited source properties.
|
||||
*
|
||||
* **Note:** This method mutates `object`.
|
||||
*
|
||||
* @alias extend
|
||||
* @category Object
|
||||
* @param object The destination object.
|
||||
* @param [sources] The source objects.
|
||||
* @returns Returns `object`.
|
||||
* @example
|
||||
*
|
||||
* function Foo() {
|
||||
* this.b = 2;
|
||||
* }
|
||||
*
|
||||
* function Bar() {
|
||||
* this.d = 4;
|
||||
* }
|
||||
*
|
||||
* Foo.prototype.c = 3;
|
||||
* Bar.prototype.e = 5;
|
||||
*
|
||||
* _.assignIn({ 'a': 1 }, new Foo, new Bar);
|
||||
* // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5 }
|
||||
*/
|
||||
(): AssignIn;
|
||||
/**
|
||||
* This method is like `_.assign` except that it iterates over own and
|
||||
* inherited source properties.
|
||||
*
|
||||
* **Note:** This method mutates `object`.
|
||||
*
|
||||
* @alias extend
|
||||
* @category Object
|
||||
* @param object The destination object.
|
||||
* @param [sources] The source objects.
|
||||
* @returns Returns `object`.
|
||||
* @example
|
||||
*
|
||||
* function Foo() {
|
||||
* this.b = 2;
|
||||
* }
|
||||
*
|
||||
* function Bar() {
|
||||
* this.d = 4;
|
||||
* }
|
||||
*
|
||||
* Foo.prototype.c = 3;
|
||||
* Bar.prototype.e = 5;
|
||||
*
|
||||
* _.assignIn({ 'a': 1 }, new Foo, new Bar);
|
||||
* // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5 }
|
||||
*/
|
||||
<TObject>(object: TObject): AssignIn1x1<TObject>;
|
||||
/**
|
||||
* This method is like `_.assign` except that it iterates over own and
|
||||
* inherited source properties.
|
||||
*
|
||||
* **Note:** This method mutates `object`.
|
||||
*
|
||||
* @alias extend
|
||||
* @category Object
|
||||
* @param object The destination object.
|
||||
* @param [sources] The source objects.
|
||||
* @returns Returns `object`.
|
||||
* @example
|
||||
*
|
||||
* function Foo() {
|
||||
* this.b = 2;
|
||||
* }
|
||||
*
|
||||
* function Bar() {
|
||||
* this.d = 4;
|
||||
* }
|
||||
*
|
||||
* Foo.prototype.c = 3;
|
||||
* Bar.prototype.e = 5;
|
||||
*
|
||||
* _.assignIn({ 'a': 1 }, new Foo, new Bar);
|
||||
* // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5 }
|
||||
*/
|
||||
<TObject, TSource>(object: TObject, source: TSource): TObject & TSource;
|
||||
}
|
||||
interface AssignIn1x1<TObject> {
|
||||
/**
|
||||
* This method is like `_.assign` except that it iterates over own and
|
||||
* inherited source properties.
|
||||
*
|
||||
* **Note:** This method mutates `object`.
|
||||
*
|
||||
* @alias extend
|
||||
* @category Object
|
||||
* @param object The destination object.
|
||||
* @param [sources] The source objects.
|
||||
* @returns Returns `object`.
|
||||
* @example
|
||||
*
|
||||
* function Foo() {
|
||||
* this.b = 2;
|
||||
* }
|
||||
*
|
||||
* function Bar() {
|
||||
* this.d = 4;
|
||||
* }
|
||||
*
|
||||
* Foo.prototype.c = 3;
|
||||
* Bar.prototype.e = 5;
|
||||
*
|
||||
* _.assignIn({ 'a': 1 }, new Foo, new Bar);
|
||||
* // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5 }
|
||||
*/
|
||||
(): AssignIn1x1<TObject>;
|
||||
/**
|
||||
* This method is like `_.assign` except that it iterates over own and
|
||||
* inherited source properties.
|
||||
*
|
||||
* **Note:** This method mutates `object`.
|
||||
*
|
||||
* @alias extend
|
||||
* @category Object
|
||||
* @param object The destination object.
|
||||
* @param [sources] The source objects.
|
||||
* @returns Returns `object`.
|
||||
* @example
|
||||
*
|
||||
* function Foo() {
|
||||
* this.b = 2;
|
||||
* }
|
||||
*
|
||||
* function Bar() {
|
||||
* this.d = 4;
|
||||
* }
|
||||
*
|
||||
* Foo.prototype.c = 3;
|
||||
* Bar.prototype.e = 5;
|
||||
*
|
||||
* _.assignIn({ 'a': 1 }, new Foo, new Bar);
|
||||
* // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5 }
|
||||
*/
|
||||
<TSource>(source: TSource): TObject & TSource;
|
||||
}
|
||||
|
||||
declare const assignIn: AssignIn;
|
||||
export = assignIn;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user