mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 23:37:04 +00:00
Make lodash faster (#35241)
* MINIFY * MINIFY 2 * MINIFY 3 * MINIFY 4 * switch to unknown (-3500 types) * Switch to built-in Omit * Simplify differenceBy/differenceWith I only changed the Imp/Exp overloads, because those are the ones that create significant numbers of types. The normal case is still fully typed, but when passing multiple comparison arrays, they are all typed as `List<unknown>`, and the iteratee is not checked for compatibility with their types. You should never use multiple comparison arrays. Brings type count down 18k, from 452k to 434k. * Simplify fill Again, only touches Imp/Exp. The only semantic difference is that, for the uncommon case that you fill an array of type T with elements of type U, the special-case for filling the whole array is gone. You get Array<T | U> now, not Array<U>. You should never change the type of an array with _.fill. * Simplify union/intersection[By/With] In the same way as difference. Saves 15k, from 426k to 411k. * Simplify pullAll/xor[By/With] 411k -> 408k * Simplify zip[By/With] 408 -> 381k types * each[Right] is a synonym for forEach[Right] Doesn't make a significant difference in the number of types though. * MINIFY 5 * Simplify List | NumericDictionary unions by removing List They are almost the same type. 381k -> 380k * Clean up function overloads 381k -> 328k Still not enough for dtslint to succeed in 1.4 GB of memory. :( * clean up lang.d.ts * I don't even know what's happening. Large swatchs of functions are disabled. The conversion of methods to list-only seems to help, but I'm not sure this will hold for other methods that apply to other types. * fix type parameter name * Reform array Things are moving in the right direction! 2,351k types * Better type parameters on Imp/Exp subtypes 2,329k types * Actually correct base type parameters for ImpL/ExpL * every/filter/find/findLast 2,037k types * flatMap[Deep/Depth] 1,865k types * forEach[Right], groupBy 1,822k types * includes, keyBy, map 1,653k types * fix wrapper constructors; add partition,orderBy back up to 1,733k types :( * Finish collection.d.ts 1,424k types I'm not sure this thing is going to converge at a lower value than the old code. * Update ImpF interface and some of function.d.ts 1382k types * clone, castArray to base, ImpU<T> is now generic 1,412k types, which moves backward a bit actually. * Rest of lang.d.ts 1,378k types * Finish math.d.ts 1337k types * Restore commented-out functions Still kind of broken though. More updates tomorrow. * Fix definition of Imp/ExpO * any out really big overload sets down to 385k types * Lots more fixed 272k types * omit, pick[By], others 181k types * Reenable some things, fix transforms types, fix values[In] 157k types * Fix rest of errors Doesn't fix $Expect assertions yet! 165k types * Remove more this-types 94k types * Remove rest of this types Well, almost all. There are still a few ones that didn't save much or any perf. 75k types * Better backward compatibility * Fix lots of lint Lots of lint to go! * Fix more lints Still about 2500 to go! * Fix ExpectType, part 1 13% done * More fixes from ExpectType 33% done * More fixes 41% done or so? * Done up to curry 49% * More expect rule fixes 71% done * Done through mapValues 80% done * Partly done pickyBy 82% done, almost * Restore partial/partialRight and get rid of rest of `this` parameters * More fixes 87% done * More test fixes 97% done * Last round of test fixes ...Maybe. There are some weird failures on my laptop that don't match what my language service is telling me. * Final round of test fixes Fixes Partial<T> from yesterday plus a couple that cropped up afterward. * Get rid of bare Imp/Exp returns Add ImpChain/ExpChain, but it's expensive so shouldn't be used much. * Make object methods specific to object. Saves about 8000 types. * Start converting remain Exp uses So far a few of them need to be ExpChain. * Remove rest of Exp<T> returns Not all are gone, but most are. A few explode performance, and a few don't have a sensible replacement. * Move changes into ts3.1 and revert to old top-level * Rename to old names * Fix test resolution With absolute paths, module resolution picks up types/lodash/fp.d.ts instead of types/lodash/ts3.1/fp.d.ts. * Update fp.d.ts * Add tslint and rename expectrule assertions * Remove lowdb codegen Use a worse type for `write` instead. It is not worth the complexity for a rarely-used package, and the return type is rarely used, except to await it. * Remove list methods that should not be on ExpU * Change names to match Lodash module names * Update names in lowdb too * Restore trivial jsdocs Which is the majority of them. I still need to restore 1. All the specific jsdocs on LodashStatic functions. 2. All the jsdocs in common.d.ts 3. All the jsdocs on various non-function properties in various files. * Restore jsdoc to common.d.ts * Restore head jsdocs * Improve `any` handling and pop's type The latter is a bit expensive but probably worth it? * Update tests * Add StringNullableChain and more ExpChain returns * Update lowdb tests They need a cast now that nullability is tracked correctly! * First round of review changes * Remove generate-lowdb, fix Object.iteratee type * Update test assertion * Update test again Not sure why this didn't fail on the previous run
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"private": true,
|
||||
"types": "index",
|
||||
"typesVersions": {
|
||||
">=3.1.0-0": { "*": ["ts3.1/*"] }
|
||||
}
|
||||
}
|
||||
@@ -1,165 +0,0 @@
|
||||
// Script for converting the lodash types into functional programming (FP) format.
|
||||
// The convertion is done based on this guide: https://github.com/lodash/lodash/wiki/FP-Guide
|
||||
|
||||
// Assumptions:
|
||||
// - All functions are defined in one of the files in the "common" subfolder
|
||||
// - All functions are defined inside of the LoDashStatic interface (although functions like _.partial may refer to another interface in the same file)
|
||||
// - Consistent indentation is used for the start and end of the above interface
|
||||
// - Consistent spacing is used for interface definitions: interface MyInterface {
|
||||
// - Consistent line breaks (\n, \r, or \r\n) are used in all files
|
||||
// - All overloads of a given function are defined in the same file
|
||||
|
||||
import fs from "fs";
|
||||
import _ from "lodash";
|
||||
import path from "path";
|
||||
import { getLineBreak, getLineNumber } from "./utils";
|
||||
|
||||
interface Definition {
|
||||
name: string;
|
||||
overloads: Overload[];
|
||||
constants: string[];
|
||||
jsdoc: string;
|
||||
}
|
||||
interface InterfaceGroup {
|
||||
functionName: string;
|
||||
interfaces: Interface[];
|
||||
}
|
||||
interface Interface {
|
||||
name: string;
|
||||
typeParams: TypeParam[];
|
||||
overloads: Overload[];
|
||||
constants: string[];
|
||||
}
|
||||
interface Overload {
|
||||
typeParams: TypeParam[];
|
||||
params: string[];
|
||||
returnType: string;
|
||||
jsdoc: string;
|
||||
tslintDisable?: string;
|
||||
}
|
||||
interface TypeParam {
|
||||
name: string;
|
||||
extends?: string;
|
||||
equals?: string;
|
||||
}
|
||||
|
||||
// Get the correct line break for the current OS (git for windows will generally convert \n to \r\n during checkout)
|
||||
let lineBreak = "\n";
|
||||
async function main() {
|
||||
lineBreak = await getLineBreak();
|
||||
const commonTypes: string[] = [];
|
||||
const tsconfigPath = path.join("..", "tsconfig.json");
|
||||
|
||||
const subfolders = ["common"];
|
||||
const promises: Array<Promise<string[]>> = [];
|
||||
for (const subfolder of subfolders) {
|
||||
promises.push(new Promise<string[]>((resolve, reject) => {
|
||||
fs.readdir(path.join("..", subfolder), (err, files) => {
|
||||
if (err) {
|
||||
console.error(`failed to list directory contents for '${subfolder}': `, err);
|
||||
reject(err);
|
||||
return;
|
||||
}
|
||||
const filePaths = files.map(f => path.join("..", subfolder, f));
|
||||
try {
|
||||
resolve(processDefinitions(filePaths, commonTypes));
|
||||
} catch (e) {
|
||||
console.error(`failed to process files in '${subfolder}': `, e);
|
||||
reject(e);
|
||||
}
|
||||
});
|
||||
}));
|
||||
}
|
||||
|
||||
let functions: string;
|
||||
try {
|
||||
functions = _.flatten(await Promise.all(promises)).join(lineBreak);
|
||||
} catch (err) {
|
||||
console.error("Failed to parse all functions: ", err);
|
||||
return;
|
||||
}
|
||||
_.pull(commonTypes, "LoDashExplicitWrapper");
|
||||
const commonTypeSearch = new RegExp(`\\b(${commonTypes.join("|")})\\b`, "g");
|
||||
functions = functions.replace(commonTypeSearch, "_.$1");
|
||||
const syncFunctions = functions.replace(/\bLoDashExplicitWrapper\b/g, "LoDashExplicitSyncWrapper");
|
||||
const asyncFunctions = functions.replace(/\bLoDashExplicitWrapper\b/g, "LoDashExplicitAsyncWrapper");
|
||||
|
||||
const lodashFile = [
|
||||
"// AUTO-GENERATED: do not modify this file directly.",
|
||||
"// If you need to make changes, modify types/lodash/scripts/generate-lowdb.ts (if necessary), then open a terminal in types/lodash/scripts, and do:",
|
||||
"// npm install && npm run generate",
|
||||
"",
|
||||
'import _ = require("lodash");',
|
||||
'declare module "./index" {',
|
||||
" interface LoDashExplicitSyncWrapper<TValue> {",
|
||||
syncFunctions,
|
||||
" }",
|
||||
"",
|
||||
" interface LoDashExplicitAsyncWrapper<TValue> {",
|
||||
asyncFunctions,
|
||||
" }",
|
||||
"}",
|
||||
"",
|
||||
].join(lineBreak);
|
||||
const lodashFilePath = path.resolve(__dirname, "..", "..", "lowdb", "_lodash.d.ts");
|
||||
fs.writeFile(lodashFilePath, lodashFile, (err) => {
|
||||
if (err)
|
||||
console.error(`Failed to write ${lodashFilePath}: `, err);
|
||||
});
|
||||
}
|
||||
|
||||
function readFile(filePath: string): Promise<string> {
|
||||
return new Promise<string>((resolve, reject) => {
|
||||
fs.readFile(filePath, "utf8", (err, data) => {
|
||||
if (err) {
|
||||
reject(err);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
resolve(data);
|
||||
} catch (e) {
|
||||
reject(e);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
async function processDefinitions(filePaths: string[], commonTypes: string[]): Promise<string[]> {
|
||||
const functions: string[] = [];
|
||||
for (const filePath of filePaths)
|
||||
functions.push(...await parseFile(filePath, commonTypes));
|
||||
return functions;
|
||||
}
|
||||
|
||||
async function parseFile(filePath: string, commonTypes: string[]): Promise<string[]> {
|
||||
const definitionString = await readFile(filePath);
|
||||
const newCommonTypeRegExp = / (?:type|interface) ([A-Za-z0-9_]+)/g;
|
||||
let newCommonType = newCommonTypeRegExp.exec(definitionString);
|
||||
while (newCommonType) {
|
||||
if (!commonTypes.includes(newCommonType[1]))
|
||||
commonTypes.push(newCommonType[1]);
|
||||
newCommonType = newCommonTypeRegExp.exec(definitionString);
|
||||
}
|
||||
|
||||
const functions: string[] = [];
|
||||
const lodashWrapperRegExp = /( *)interface +LoDashExplicitWrapper<\w+> *(?:extends .+)? *{/g;
|
||||
let lodashWrapperMatch = lodashWrapperRegExp.exec(definitionString);
|
||||
while (lodashWrapperMatch) {
|
||||
const startIndex = definitionString.indexOf(lineBreak, lodashWrapperMatch.index) + lineBreak.length;
|
||||
const endIndex = definitionString.indexOf(`${lineBreak}${lodashWrapperMatch[1]}}`, startIndex);
|
||||
if (endIndex === -1) {
|
||||
const lineNumber = getLineNumber(definitionString, startIndex);
|
||||
console.warn(`Failed to find end of interface 'LoDashExplicitWrapper' (starting at ${filePath} line ${lineNumber}).`);
|
||||
break;
|
||||
}
|
||||
let functionString = definitionString.substring(startIndex, endIndex);
|
||||
// Remove comments since they're generally useless (e.g. @see XXXX)
|
||||
functionString = functionString.replace(/ *\/\*\*[\s\S]+?\*\/(?:\r\n|\n|\r)/g, "");
|
||||
functionString = functionString.replace(/(?:(\r\n){2,}|(\n){2,}|(\r){2,})/g, "$1$2$3");
|
||||
functions.push(functionString);
|
||||
lodashWrapperMatch = lodashWrapperRegExp.exec(definitionString);
|
||||
}
|
||||
return functions;
|
||||
}
|
||||
|
||||
main();
|
||||
@@ -3,9 +3,8 @@
|
||||
"name": "lodash-scripts",
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
"generate": "ts-node generate-fp && ts-node generate-lowdb",
|
||||
"generate": "ts-node generate-fp",
|
||||
"fp": "ts-node generate-fp",
|
||||
"lowdb": "ts-node generate-lowdb"
|
||||
},
|
||||
"devDependencies": {
|
||||
"lodash": "^4.17.4",
|
||||
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { add } from "./index";
|
||||
export = add;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { after } from "./index";
|
||||
export = after;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { ary } from "./index";
|
||||
export = ary;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { assign } from "./index";
|
||||
export = assign;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { assignIn } from "./index";
|
||||
export = assignIn;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { assignInWith } from "./index";
|
||||
export = assignInWith;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { assignWith } from "./index";
|
||||
export = assignWith;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { at } from "./index";
|
||||
export = at;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { attempt } from "./index";
|
||||
export = attempt;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { before } from "./index";
|
||||
export = before;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { bind } from "./index";
|
||||
export = bind;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { bindAll } from "./index";
|
||||
export = bindAll;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { bindKey } from "./index";
|
||||
export = bindKey;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { camelCase } from "./index";
|
||||
export = camelCase;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { capitalize } from "./index";
|
||||
export = capitalize;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { castArray } from "./index";
|
||||
export = castArray;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { ceil } from "./index";
|
||||
export = ceil;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { chain } from "./index";
|
||||
export = chain;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { chunk } from "./index";
|
||||
export = chunk;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { clamp } from "./index";
|
||||
export = clamp;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { clone } from "./index";
|
||||
export = clone;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { cloneDeep } from "./index";
|
||||
export = cloneDeep;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { cloneDeepWith } from "./index";
|
||||
export = cloneDeepWith;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { cloneWith } from "./index";
|
||||
export = cloneWith;
|
||||
Vendored
+2120
File diff suppressed because it is too large
Load Diff
+1918
File diff suppressed because it is too large
Load Diff
+286
@@ -0,0 +1,286 @@
|
||||
import _ = require("../index");
|
||||
// tslint:disable-next-line:strict-export-declare-modifiers
|
||||
type GlobalPartial<T> = Partial<T>;
|
||||
declare module "../index" {
|
||||
type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;
|
||||
type PartialObject<T> = GlobalPartial<T>;
|
||||
type Many<T> = T | ReadonlyArray<T>;
|
||||
type ImpChain<T> =
|
||||
T extends { __trapAny: any } ? Collection<any> & Function<any> & Object<any> & Primitive<any> & String :
|
||||
T extends null | undefined ? Primitive<T> :
|
||||
T extends string | null | undefined ? String :
|
||||
T extends (...args: any) => any ? Function<T> :
|
||||
T extends List<infer U> | null | undefined ? Collection<U> :
|
||||
T extends object | null | undefined ? Object<T> :
|
||||
Primitive<T>;
|
||||
type ExpChain<T> =
|
||||
T extends { __trapAny: any } ? CollectionChain<any> & FunctionChain<any> & ObjectChain<any> & PrimitiveChain<any> & StringChain :
|
||||
T extends null | undefined ? PrimitiveChain<T> :
|
||||
T extends string ? StringChain :
|
||||
T extends string | null | undefined ? StringNullableChain :
|
||||
T extends (...args: any) => any ? FunctionChain<T> :
|
||||
T extends List<infer U> | null | undefined ? CollectionChain<U> :
|
||||
T extends object | null | undefined ? ObjectChain<T> :
|
||||
PrimitiveChain<T>;
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Creates a lodash object which wraps value to enable implicit method chain sequences.
|
||||
* Methods that operate on and return arrays, collections, and functions can be chained together.
|
||||
* Methods that retrieve a single value or may return a primitive value will automatically end the
|
||||
* chain sequence and return the unwrapped value. Otherwise, the value must be unwrapped with value().
|
||||
*
|
||||
* Explicit chain sequences, which must be unwrapped with value(), may be enabled using _.chain.
|
||||
*
|
||||
* The execution of chained methods is lazy, that is, it's deferred until value() is
|
||||
* implicitly or explicitly called.
|
||||
*
|
||||
* Lazy evaluation allows several methods to support shortcut fusion. Shortcut fusion
|
||||
* is an optimization to merge iteratee calls; this avoids the creation of intermediate
|
||||
* arrays and can greatly reduce the number of iteratee executions. Sections of a chain
|
||||
* sequence qualify for shortcut fusion if the section is applied to an array and iteratees
|
||||
* accept only one argument. The heuristic for whether a section qualifies for shortcut
|
||||
* fusion is subject to change.
|
||||
*
|
||||
* Chaining is supported in custom builds as long as the value() method is directly or
|
||||
* indirectly included in the build.
|
||||
*
|
||||
* In addition to lodash methods, wrappers have Array and String methods.
|
||||
* The wrapper Array methods are:
|
||||
* concat, join, pop, push, shift, sort, splice, and unshift.
|
||||
* The wrapper String methods are:
|
||||
* replace and split.
|
||||
*
|
||||
* The wrapper methods that support shortcut fusion are:
|
||||
* at, compact, drop, dropRight, dropWhile, filter, find, findLast, head, initial, last,
|
||||
* map, reject, reverse, slice, tail, take, takeRight, takeRightWhile, takeWhile, and toArray
|
||||
*
|
||||
* The chainable wrapper methods are:
|
||||
* after, ary, assign, assignIn, assignInWith, assignWith, at, before, bind, bindAll, bindKey,
|
||||
* castArray, chain, chunk, commit, compact, concat, conforms, constant, countBy, create,
|
||||
* curry, debounce, defaults, defaultsDeep, defer, delay, difference, differenceBy, differenceWith,
|
||||
* drop, dropRight, dropRightWhile, dropWhile, extend, extendWith, fill, filter, flatMap,
|
||||
* flatMapDeep, flatMapDepth, flatten, flattenDeep, flattenDepth, flip, flow, flowRight,
|
||||
* fromPairs, functions, functionsIn, groupBy, initial, intersection, intersectionBy, intersectionWith,
|
||||
* invert, invertBy, invokeMap, iteratee, keyBy, keys, keysIn, map, mapKeys, mapValues,
|
||||
* matches, matchesProperty, memoize, merge, mergeWith, method, methodOf, mixin, negate,
|
||||
* nthArg, omit, omitBy, once, orderBy, over, overArgs, overEvery, overSome, partial, partialRight,
|
||||
* partition, pick, pickBy, plant, property, propertyOf, pull, pullAll, pullAllBy, pullAllWith, pullAt,
|
||||
* push, range, rangeRight, rearg, reject, remove, rest, reverse, sampleSize, set, setWith,
|
||||
* shuffle, slice, sort, sortBy, sortedUniq, sortedUniqBy, splice, spread, tail, take,
|
||||
* takeRight, takeRightWhile, takeWhile, tap, throttle, thru, toArray, toPairs, toPairsIn,
|
||||
* toPath, toPlainObject, transform, unary, union, unionBy, unionWith, uniq, uniqBy, uniqWith,
|
||||
* unset, unshift, unzip, unzipWith, update, updateWith, values, valuesIn, without, wrap,
|
||||
* xor, xorBy, xorWith, zip, zipObject, zipObjectDeep, and zipWith.
|
||||
*
|
||||
* The wrapper methods that are not chainable by default are:
|
||||
* add, attempt, camelCase, capitalize, ceil, clamp, clone, cloneDeep, cloneDeepWith, cloneWith,
|
||||
* conformsTo, deburr, defaultTo, divide, each, eachRight, endsWith, eq, escape, escapeRegExp,
|
||||
* every, find, findIndex, findKey, findLast, findLastIndex, findLastKey, first, floor, forEach,
|
||||
* forEachRight, forIn, forInRight, forOwn, forOwnRight, get, gt, gte, has, hasIn, head,
|
||||
* identity, includes, indexOf, inRange, invoke, isArguments, isArray, isArrayBuffer,
|
||||
* isArrayLike, isArrayLikeObject, isBoolean, isBuffer, isDate, isElement, isEmpty, isEqual, isEqualWith,
|
||||
* isError, isFinite, isFunction, isInteger, isLength, isMap, isMatch, isMatchWith, isNaN,
|
||||
* isNative, isNil, isNull, isNumber, isObject, isObjectLike, isPlainObject, isRegExp,
|
||||
* isSafeInteger, isSet, isString, isUndefined, isTypedArray, isWeakMap, isWeakSet, join,
|
||||
* kebabCase, last, lastIndexOf, lowerCase, lowerFirst, lt, lte, max, maxBy, mean, meanBy,
|
||||
* min, minBy, multiply, noConflict, noop, now, nth, pad, padEnd, padStart, parseInt, pop,
|
||||
* random, reduce, reduceRight, repeat, result, round, runInContext, sample, shift, size,
|
||||
* snakeCase, some, sortedIndex, sortedIndexBy, sortedLastIndex, sortedLastIndexBy, startCase,
|
||||
* startsWith, stubArray, stubFalse, stubObject, stubString, stubTrue, subtract, sum, sumBy,
|
||||
* template, times, toFinite, toInteger, toJSON, toLength, toLower, toNumber, toSafeInteger,
|
||||
* toString, toUpper, trim, trimEnd, trimStart, truncate, unescape, uniqueId, upperCase,
|
||||
* upperFirst, value, and words.
|
||||
**/
|
||||
<TrapAny extends { __trapAny: any }>(value: TrapAny): Collection<any> & Function<any> & Object<any> & Primitive<any> & String;
|
||||
<T extends null | undefined>(value: T): Primitive<T>;
|
||||
(value: string | null | undefined): String;
|
||||
<T extends (...args: any) => any>(value: T): Function<T>;
|
||||
<T = any>(value: List<T> | null | undefined): Collection<T>;
|
||||
<T extends object>(value: T | null | undefined): Object<T>;
|
||||
<T>(value: T): Primitive<T>;
|
||||
/**
|
||||
* The semantic version number.
|
||||
**/
|
||||
VERSION: string;
|
||||
/**
|
||||
* 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.
|
||||
**/
|
||||
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.
|
||||
**/
|
||||
interface TemplateSettings {
|
||||
/**
|
||||
* The "escape" delimiter.
|
||||
**/
|
||||
escape?: RegExp;
|
||||
/**
|
||||
* The "evaluate" delimiter.
|
||||
**/
|
||||
evaluate?: RegExp;
|
||||
/**
|
||||
* An object to import into the template as local variables.
|
||||
*/
|
||||
imports?: Dictionary<any>;
|
||||
/**
|
||||
* The "interpolate" delimiter.
|
||||
*/
|
||||
interpolate?: RegExp;
|
||||
/**
|
||||
* Used to reference the data object in the template text.
|
||||
*/
|
||||
variable?: string;
|
||||
}
|
||||
/**
|
||||
* Creates a cache object to store key/value pairs.
|
||||
*/
|
||||
interface MapCache {
|
||||
/**
|
||||
* Removes `key` and its value from the cache.
|
||||
* @param key The key of the value to remove.
|
||||
* @return Returns `true` if the entry was removed successfully, else `false`.
|
||||
*/
|
||||
delete(key: any): boolean;
|
||||
/**
|
||||
* Gets the cached value for `key`.
|
||||
* @param key The key of the value to get.
|
||||
* @return Returns the cached value.
|
||||
*/
|
||||
get(key: any): any;
|
||||
/**
|
||||
* Checks if a cached value for `key` exists.
|
||||
* @param key The key of the entry to check.
|
||||
* @return Returns `true` if an entry for `key` exists, else `false`.
|
||||
*/
|
||||
has(key: any): boolean;
|
||||
/**
|
||||
* Sets `value` to `key` of the cache.
|
||||
* @param key The key of the value to cache.
|
||||
* @param value The value to cache.
|
||||
* @return Returns the cache object.
|
||||
*/
|
||||
set(key: any, value: any): this;
|
||||
/**
|
||||
* Removes all key-value entries from the map.
|
||||
*/
|
||||
clear?: () => void;
|
||||
}
|
||||
interface MapCacheConstructor {
|
||||
new (): MapCache;
|
||||
}
|
||||
interface Collection<T> {
|
||||
pop(): T | undefined;
|
||||
push(...items: T[]): this;
|
||||
shift(): T | undefined;
|
||||
sort(compareFn?: (a: T, b: T) => number): this;
|
||||
splice(start: number, deleteCount?: number, ...items: T[]): this;
|
||||
unshift(...items: T[]): this;
|
||||
}
|
||||
interface CollectionChain<T> {
|
||||
pop(): ExpChain<T | undefined>;
|
||||
push(...items: T[]): this;
|
||||
shift(): ExpChain<T | undefined>;
|
||||
sort(compareFn?: (a: T, b: T) => number): this;
|
||||
splice(start: number, deleteCount?: number, ...items: T[]): this;
|
||||
unshift(...items: T[]): this;
|
||||
}
|
||||
interface Function<T extends (...args: any) => any> extends LoDashImplicitWrapper<T> {
|
||||
}
|
||||
interface String extends LoDashImplicitWrapper<string> {
|
||||
}
|
||||
interface Object<T> extends LoDashImplicitWrapper<T> {
|
||||
}
|
||||
interface Collection<T> extends LoDashImplicitWrapper<List<T>> {
|
||||
}
|
||||
interface Primitive<T> extends LoDashImplicitWrapper<T> {
|
||||
}
|
||||
interface FunctionChain<T extends (...args: any) => any> extends LoDashExplicitWrapper<T> {
|
||||
}
|
||||
interface StringChain extends LoDashExplicitWrapper<string> {
|
||||
}
|
||||
interface StringNullableChain extends LoDashExplicitWrapper<string | undefined> {
|
||||
}
|
||||
interface ObjectChain<T> extends LoDashExplicitWrapper<T> {
|
||||
}
|
||||
interface CollectionChain<T> extends LoDashExplicitWrapper<List<T>> {
|
||||
}
|
||||
interface CollectionNullableChain<T> extends LoDashExplicitWrapper<List<T> | undefined> {
|
||||
}
|
||||
interface PrimitiveChain<T> extends LoDashExplicitWrapper<T> {
|
||||
}
|
||||
type NotVoid = unknown;
|
||||
type IterateeShorthand<T> = PropertyName | [PropertyName, any] | PartialDeep<T>;
|
||||
type ArrayIterator<T, TResult> = (value: T, index: number, collection: T[]) => TResult;
|
||||
type ListIterator<T, TResult> = (value: T, index: number, collection: List<T>) => TResult;
|
||||
type ListIteratee<T> = ListIterator<T, NotVoid> | IterateeShorthand<T>;
|
||||
type ListIterateeCustom<T, TResult> = ListIterator<T, TResult> | IterateeShorthand<T>;
|
||||
type ListIteratorTypeGuard<T, S extends T> = (value: T, index: number, collection: List<T>) => value is S;
|
||||
// Note: key should be string, not keyof T, because the actual object may contain extra properties that were not specified in the type.
|
||||
type ObjectIterator<TObject, TResult> = (value: TObject[keyof TObject], key: string, collection: TObject) => TResult;
|
||||
type ObjectIteratee<TObject> = ObjectIterator<TObject, NotVoid> | IterateeShorthand<TObject[keyof TObject]>;
|
||||
type ObjectIterateeCustom<TObject, TResult> = ObjectIterator<TObject, TResult> | IterateeShorthand<TObject[keyof TObject]>;
|
||||
type ObjectIteratorTypeGuard<TObject, S extends TObject[keyof TObject]> = (value: TObject[keyof TObject], key: string, collection: TObject) => value is S;
|
||||
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. */
|
||||
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) | IterateeShorthand<T>;
|
||||
type ValueIterateeCustom<T, TResult> = ((value: T) => TResult) | IterateeShorthand<T>;
|
||||
type ValueIteratorTypeGuard<T, S extends T> = (value: T) => value is S;
|
||||
type ValueKeyIteratee<T> = ((value: T, key: string) => NotVoid) | IterateeShorthand<T>;
|
||||
type ValueKeyIterateeTypeGuard<T, S extends T> = (value: T, key: string) => value is S;
|
||||
type Comparator<T> = (a: T, b: T) => boolean;
|
||||
type Comparator2<T1, T2> = (a: T1, b: T2) => boolean;
|
||||
type PropertyName = string | number | symbol;
|
||||
type PropertyPath = Many<PropertyName>;
|
||||
/** Common interface between Arrays and jQuery objects */
|
||||
type List<T> = ArrayLike<T>;
|
||||
interface Dictionary<T> {
|
||||
[index: string]: T;
|
||||
}
|
||||
interface NumericDictionary<T> {
|
||||
[index: number]: T;
|
||||
}
|
||||
// Crazy typedef needed get _.omit to work properly with Dictionary and NumericDictionary
|
||||
type AnyKindOfDictionary =
|
||||
| Dictionary<unknown>
|
||||
| NumericDictionary<unknown>;
|
||||
interface Cancelable {
|
||||
cancel(): void;
|
||||
flush(): void;
|
||||
}
|
||||
type PartialDeep<T> = {
|
||||
[P in keyof T]?: PartialDeep<T[P]>;
|
||||
};
|
||||
// For backwards compatibility
|
||||
type LoDashImplicitArrayWrapper<T> = LoDashImplicitWrapper<T[]>;
|
||||
type LoDashImplicitNillableArrayWrapper<T> = LoDashImplicitWrapper<T[] | null | undefined>;
|
||||
type LoDashImplicitObjectWrapper<T> = LoDashImplicitWrapper<T>;
|
||||
type LoDashImplicitNillableObjectWrapper<T> = LoDashImplicitWrapper<T | null | undefined>;
|
||||
type LoDashImplicitNumberArrayWrapper = LoDashImplicitWrapper<number[]>;
|
||||
type LoDashImplicitStringWrapper = LoDashImplicitWrapper<string>;
|
||||
type LoDashExplicitArrayWrapper<T> = LoDashExplicitWrapper<T[]>;
|
||||
type LoDashExplicitNillableArrayWrapper<T> = LoDashExplicitWrapper<T[] | null | undefined>;
|
||||
type LoDashExplicitObjectWrapper<T> = LoDashExplicitWrapper<T>;
|
||||
type LoDashExplicitNillableObjectWrapper<T> = LoDashExplicitWrapper<T | null | undefined>;
|
||||
type LoDashExplicitNumberArrayWrapper = LoDashExplicitWrapper<number[]>;
|
||||
type LoDashExplicitStringWrapper = LoDashExplicitWrapper<string>;
|
||||
type DictionaryIterator<T, TResult> = ObjectIterator<Dictionary<T>, TResult>;
|
||||
type DictionaryIteratee<T> = ObjectIteratee<Dictionary<T>>;
|
||||
type DictionaryIteratorTypeGuard<T, S extends T> = ObjectIteratorTypeGuard<Dictionary<T>, S>;
|
||||
// NOTE: keys of objects at run time are always strings, even when a NumericDictionary is being iterated.
|
||||
type NumericDictionaryIterator<T, TResult> = (value: T, key: string, collection: NumericDictionary<T>) => TResult;
|
||||
type NumericDictionaryIteratee<T> = NumericDictionaryIterator<T, NotVoid> | IterateeShorthand<T>;
|
||||
type NumericDictionaryIterateeCustom<T, TResult> = NumericDictionaryIterator<T, TResult> | IterateeShorthand<T>;
|
||||
}
|
||||
Vendored
+23
@@ -0,0 +1,23 @@
|
||||
import _ = require("../index");
|
||||
declare module "../index" {
|
||||
interface LoDashStatic {
|
||||
/*
|
||||
* Gets the number of milliseconds that have elapsed since the Unix epoch (1 January 1970 00:00:00 UTC).
|
||||
*
|
||||
* @return The number of milliseconds.
|
||||
*/
|
||||
now(): number;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.now
|
||||
*/
|
||||
now(): number;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.now
|
||||
*/
|
||||
now(): PrimitiveChain<number>;
|
||||
}
|
||||
}
|
||||
+1392
File diff suppressed because it is too large
Load Diff
Vendored
+1694
File diff suppressed because it is too large
Load Diff
Vendored
+405
@@ -0,0 +1,405 @@
|
||||
import _ = require("../index");
|
||||
declare module "../index" {
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Adds two numbers.
|
||||
*
|
||||
* @param augend The first number to add.
|
||||
* @param addend The second number to add.
|
||||
* @return Returns the sum.
|
||||
*/
|
||||
add(augend: number, addend: number): number;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.add
|
||||
*/
|
||||
add(addend: number): number;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.add
|
||||
*/
|
||||
add(addend: number): PrimitiveChain<number>;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Calculates n rounded up to precision.
|
||||
*
|
||||
* @param n The number to round up.
|
||||
* @param precision The precision to round up to.
|
||||
* @return Returns the rounded up number.
|
||||
*/
|
||||
ceil(n: number, precision?: number): number;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.ceil
|
||||
*/
|
||||
ceil(precision?: number): number;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.ceil
|
||||
*/
|
||||
ceil(precision?: number): PrimitiveChain<number>;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Divide two numbers.
|
||||
*
|
||||
* @param dividend The first number in a division.
|
||||
* @param divisor The second number in a division.
|
||||
* @returns Returns the quotient.
|
||||
*/
|
||||
divide(dividend: number, divisor: number): number;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.divide
|
||||
*/
|
||||
divide(divisor: number): number;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.divide
|
||||
*/
|
||||
divide(divisor: number): PrimitiveChain<number>;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Calculates n rounded down to precision.
|
||||
*
|
||||
* @param n The number to round down.
|
||||
* @param precision The precision to round down to.
|
||||
* @return Returns the rounded down number.
|
||||
*/
|
||||
floor(n: number, precision?: number): number;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.floor
|
||||
*/
|
||||
floor(precision?: number): number;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.floor
|
||||
*/
|
||||
floor(precision?: number): PrimitiveChain<number>;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Computes the maximum value of `array`. If `array` is empty or falsey
|
||||
* `undefined` is returned.
|
||||
*
|
||||
* @category Math
|
||||
* @param array The array to iterate over.
|
||||
* @returns Returns the maximum value.
|
||||
*/
|
||||
max<T>(collection: List<T> | null | undefined): T | undefined;
|
||||
}
|
||||
interface Collection<T> {
|
||||
/**
|
||||
* @see _.max
|
||||
*/
|
||||
max(): T | undefined;
|
||||
}
|
||||
interface CollectionChain<T> {
|
||||
/**
|
||||
* @see _.max
|
||||
*/
|
||||
max(): ExpChain<T | undefined>;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* This method is like `_.max` except that it accepts `iteratee` which is
|
||||
* invoked for each element in `array` to generate the criterion by which
|
||||
* the value is ranked. The iteratee is invoked with one argument: (value).
|
||||
*
|
||||
* @category Math
|
||||
* @param array The array to iterate over.
|
||||
* @param iteratee The iteratee invoked per element.
|
||||
* @returns Returns the maximum value.
|
||||
* @example
|
||||
*
|
||||
* var objects = [{ 'n': 1 }, { 'n': 2 }];
|
||||
*
|
||||
* _.maxBy(objects, function(o) { return o.a; });
|
||||
* // => { 'n': 2 }
|
||||
*
|
||||
* // using the `_.property` iteratee shorthand
|
||||
* _.maxBy(objects, 'n');
|
||||
* // => { 'n': 2 }
|
||||
*/
|
||||
maxBy<T>(collection: List<T> | null | undefined, iteratee?: ValueIteratee<T>): T | undefined;
|
||||
}
|
||||
interface Collection<T> {
|
||||
/**
|
||||
* @see _.maxBy
|
||||
*/
|
||||
maxBy(iteratee?: ValueIteratee<T>): T | undefined;
|
||||
}
|
||||
interface CollectionChain<T> {
|
||||
/**
|
||||
* @see _.maxBy
|
||||
*/
|
||||
maxBy(iteratee?: ValueIteratee<T>): ExpChain<T | undefined>;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Computes the mean of the values in `array`.
|
||||
*
|
||||
* @category Math
|
||||
* @param array The array to iterate over.
|
||||
* @returns Returns the mean.
|
||||
* @example
|
||||
*
|
||||
* _.mean([4, 2, 8, 6]);
|
||||
* // => 5
|
||||
*/
|
||||
mean(collection: List<any> | null | undefined): number;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.mean
|
||||
*/
|
||||
mean(): number;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.mean
|
||||
*/
|
||||
mean(): PrimitiveChain<number>;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Computes the mean of the provided propties of the objects in the `array`
|
||||
*
|
||||
* @category Math
|
||||
* @param array The array to iterate over.
|
||||
* @param iteratee The iteratee invoked per element.
|
||||
* @returns Returns the mean.
|
||||
* @example
|
||||
*
|
||||
* _.mean([{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }], 'n');
|
||||
* // => 5
|
||||
*/
|
||||
meanBy<T>(collection: List<T> | null | undefined, iteratee?: ValueIteratee<T>): number;
|
||||
}
|
||||
interface Collection<T> {
|
||||
/**
|
||||
* @see _.meanBy
|
||||
*/
|
||||
meanBy(iteratee?: ValueIteratee<T>): number;
|
||||
}
|
||||
interface CollectionChain<T> {
|
||||
/**
|
||||
* @see _.meanBy
|
||||
*/
|
||||
meanBy(iteratee?: ValueIteratee<T>): PrimitiveChain<number>;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Computes the minimum value of `array`. If `array` is empty or falsey
|
||||
* `undefined` is returned.
|
||||
*
|
||||
* @category Math
|
||||
* @param array The array to iterate over.
|
||||
* @returns Returns the minimum value.
|
||||
*/
|
||||
min<T>(collection: List<T> | null | undefined): T | undefined;
|
||||
}
|
||||
interface Collection<T> {
|
||||
/**
|
||||
* @see _.min
|
||||
*/
|
||||
min(): T | undefined;
|
||||
}
|
||||
interface CollectionChain<T> {
|
||||
/**
|
||||
* @see _.min
|
||||
*/
|
||||
min(): ExpChain<T | undefined>;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* This method is like `_.min` except that it accepts `iteratee` which is
|
||||
* invoked for each element in `array` to generate the criterion by which
|
||||
* the value is ranked. The iteratee is invoked with one argument: (value).
|
||||
*
|
||||
* @category Math
|
||||
* @param array The array to iterate over.
|
||||
* @param iteratee The iteratee invoked per element.
|
||||
* @returns Returns the minimum value.
|
||||
* @example
|
||||
*
|
||||
* var objects = [{ 'n': 1 }, { 'n': 2 }];
|
||||
*
|
||||
* _.minBy(objects, function(o) { return o.a; });
|
||||
* // => { 'n': 1 }
|
||||
*
|
||||
* // using the `_.property` iteratee shorthand
|
||||
* _.minBy(objects, 'n');
|
||||
* // => { 'n': 1 }
|
||||
*/
|
||||
minBy<T>(collection: List<T> | null | undefined, iteratee?: ValueIteratee<T>): T | undefined;
|
||||
}
|
||||
interface Collection<T> {
|
||||
/**
|
||||
* @see _.minBy
|
||||
*/
|
||||
minBy(iteratee?: ValueIteratee<T>): T | undefined;
|
||||
}
|
||||
interface CollectionChain<T> {
|
||||
/**
|
||||
* @see _.minBy
|
||||
*/
|
||||
minBy(iteratee?: ValueIteratee<T>): ExpChain<T | undefined>;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Multiply two numbers.
|
||||
* @param multiplier The first number in a multiplication.
|
||||
* @param multiplicand The second number in a multiplication.
|
||||
* @returns Returns the product.
|
||||
*/
|
||||
multiply(multiplier: number, multiplicand: number): number;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.multiply
|
||||
*/
|
||||
multiply(multiplicand: number): number;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.multiply
|
||||
*/
|
||||
multiply(multiplicand: number): PrimitiveChain<number>;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Calculates n rounded to precision.
|
||||
*
|
||||
* @param n The number to round.
|
||||
* @param precision The precision to round to.
|
||||
* @return Returns the rounded number.
|
||||
*/
|
||||
round(n: number, precision?: number): number;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.round
|
||||
*/
|
||||
round(precision?: number): number;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.round
|
||||
*/
|
||||
round(precision?: number): PrimitiveChain<number>;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Subtract two numbers.
|
||||
*
|
||||
* @category Math
|
||||
* @param minuend The first number in a subtraction.
|
||||
* @param subtrahend The second number in a subtraction.
|
||||
* @returns Returns the difference.
|
||||
* @example
|
||||
*
|
||||
* _.subtract(6, 4);
|
||||
* // => 2
|
||||
*/
|
||||
subtract(minuend: number, subtrahend: number): number;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.subtract
|
||||
*/
|
||||
subtract(subtrahend: number): number;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.subtract
|
||||
*/
|
||||
subtract(subtrahend: number): PrimitiveChain<number>;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Computes the sum of the values in `array`.
|
||||
*
|
||||
* @category Math
|
||||
* @param array The array to iterate over.
|
||||
* @returns Returns the sum.
|
||||
* @example
|
||||
*
|
||||
* _.sum([4, 2, 8, 6]);
|
||||
* // => 20
|
||||
*/
|
||||
sum(collection: List<any> | null | undefined): number;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.sum
|
||||
*/
|
||||
sum(): number;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.sum
|
||||
*/
|
||||
sum(): PrimitiveChain<number>;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* This method is like `_.sum` except that it accepts `iteratee` which is
|
||||
* invoked for each element in `array` to generate the value to be summed.
|
||||
* The iteratee is invoked with one argument: (value).
|
||||
*
|
||||
* @category Math
|
||||
* @param array The array to iterate over.
|
||||
* @param [iteratee=_.identity] The iteratee invoked per element.
|
||||
* @returns Returns the sum.
|
||||
* @example
|
||||
*
|
||||
* var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
|
||||
*
|
||||
* _.sumBy(objects, function(o) { return o.n; });
|
||||
* // => 20
|
||||
*
|
||||
* // using the `_.property` iteratee shorthand
|
||||
* _.sumBy(objects, 'n');
|
||||
* // => 20
|
||||
*/
|
||||
sumBy<T>(collection: List<T> | null | undefined, iteratee?: ((value: T) => number) | string): number;
|
||||
}
|
||||
interface Collection<T> {
|
||||
/**
|
||||
* @see _.sumBy
|
||||
*/
|
||||
sumBy(iteratee?: ((value: T) => number) | string): number;
|
||||
}
|
||||
interface CollectionChain<T> {
|
||||
/**
|
||||
* @see _.sumBy
|
||||
*/
|
||||
sumBy(iteratee?: ((value: T) => number) | string): PrimitiveChain<number>;
|
||||
}
|
||||
}
|
||||
+131
@@ -0,0 +1,131 @@
|
||||
import _ = require("../index");
|
||||
declare module "../index" {
|
||||
// clamp
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Clamps `number` within the inclusive `lower` and `upper` bounds.
|
||||
*
|
||||
* @category Number
|
||||
* @param number The number to clamp.
|
||||
* @param [lower] The lower bound.
|
||||
* @param upper The upper bound.
|
||||
* @returns Returns the clamped number.
|
||||
* @example
|
||||
*
|
||||
* _.clamp(-10, -5, 5);
|
||||
* // => -5
|
||||
*
|
||||
* _.clamp(10, -5, 5);
|
||||
* // => 5
|
||||
* Clamps `number` within the inclusive `lower` and `upper` bounds.
|
||||
*
|
||||
* @category Number
|
||||
* @param number The number to clamp.
|
||||
* @param [lower] The lower bound.
|
||||
* @param upper The upper bound.
|
||||
* @returns Returns the clamped number.
|
||||
* @example
|
||||
*
|
||||
* _.clamp(-10, -5, 5);
|
||||
* // => -5
|
||||
*
|
||||
* _.clamp(10, -5, 5);
|
||||
*/
|
||||
clamp(number: number, lower: number, upper: number): number;
|
||||
/**
|
||||
* @see _.clamp
|
||||
*/
|
||||
clamp(number: number, upper: number): number;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.clamp
|
||||
*/
|
||||
clamp(lower: number, upper: number): number;
|
||||
/**
|
||||
* @see _.clamp
|
||||
*/
|
||||
clamp(upper: number): number;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.clamp
|
||||
*/
|
||||
clamp(lower: number, upper: number): PrimitiveChain<number>;
|
||||
/**
|
||||
* @see _.clamp
|
||||
*/
|
||||
clamp(upper: number): PrimitiveChain<number>;
|
||||
}
|
||||
// inRange
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Checks if n is between start and up to but not including, end. If end is not specified it’s set to start
|
||||
* with start then set to 0.
|
||||
*
|
||||
* @param n The number to check.
|
||||
* @param start The start of the range.
|
||||
* @param end The end of the range.
|
||||
* @return Returns true if n is in the range, else false.
|
||||
*/
|
||||
inRange(n: number, start: number, end?: number): boolean;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.inRange
|
||||
*/
|
||||
inRange(start: number, end?: number): boolean;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.inRange
|
||||
*/
|
||||
inRange(start: number, end?: number): PrimitiveChain<boolean>;
|
||||
}
|
||||
// random
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Produces a random number between min and max (inclusive). If only one argument is provided a number between
|
||||
* 0 and the given number is returned. If floating is true, or either min or max are floats, a floating-point
|
||||
* number is returned instead of an integer.
|
||||
*
|
||||
* @param min The minimum possible value.
|
||||
* @param max The maximum possible value.
|
||||
* @param floating Specify returning a floating-point number.
|
||||
* @return Returns the random number.
|
||||
*/
|
||||
random(floating?: boolean): number;
|
||||
/**
|
||||
* @see _.random
|
||||
*/
|
||||
random(max: number, floating?: boolean): number;
|
||||
/**
|
||||
* @see _.random
|
||||
*/
|
||||
random(min: number, max: number, floating?: boolean): number;
|
||||
/**
|
||||
* @see _.random
|
||||
*/
|
||||
random(min: number, index: string | number, guard: object): number;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.random
|
||||
*/
|
||||
random(floating?: boolean): number;
|
||||
/**
|
||||
* @see _.random
|
||||
*/
|
||||
random(max: number, floating?: boolean): number;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.random
|
||||
*/
|
||||
random(floating?: boolean): PrimitiveChain<number>;
|
||||
/**
|
||||
* @see _.random
|
||||
*/
|
||||
random(max: number, floating?: boolean): PrimitiveChain<number>;
|
||||
}
|
||||
}
|
||||
+2404
File diff suppressed because it is too large
Load Diff
Vendored
+210
@@ -0,0 +1,210 @@
|
||||
import _ = require("../index");
|
||||
declare module "../index" {
|
||||
// chain
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Creates a lodash object that wraps value with explicit method chaining enabled.
|
||||
*
|
||||
* @param value The value to wrap.
|
||||
* @return Returns the new lodash wrapper instance.
|
||||
*/
|
||||
chain<TrapAny extends { __lodashAnyHack: any }>(value: TrapAny): CollectionChain<any> & FunctionChain<any> & ObjectChain<any> & PrimitiveChain<any> & StringChain;
|
||||
/**
|
||||
* @see _.chain
|
||||
*/
|
||||
chain<T extends null | undefined>(value: T): PrimitiveChain<T>;
|
||||
/**
|
||||
* @see _.chain
|
||||
*/
|
||||
chain(value: string): StringChain;
|
||||
/**
|
||||
* @see _.chain
|
||||
*/
|
||||
chain(value: string | null | undefined): StringNullableChain;
|
||||
/**
|
||||
* @see _.chain
|
||||
*/
|
||||
chain<T extends (...args: any[]) => any>(value: T): FunctionChain<T>;
|
||||
/**
|
||||
* @see _.chain
|
||||
*/
|
||||
chain<T = any>(value: List<T> | null | undefined): CollectionChain<T>;
|
||||
/**
|
||||
* @see _.chain
|
||||
*/
|
||||
chain<T extends object>(value: T | null | undefined): ObjectChain<T>;
|
||||
/**
|
||||
* @see _.chain
|
||||
*/
|
||||
chain<T>(value: T): PrimitiveChain<T>;
|
||||
}
|
||||
interface Collection<T> {
|
||||
/**
|
||||
* @see _.chain
|
||||
*/
|
||||
chain(): CollectionChain<T>;
|
||||
}
|
||||
interface String {
|
||||
/**
|
||||
* @see _.chain
|
||||
*/
|
||||
chain(): StringChain;
|
||||
}
|
||||
interface Object<T> {
|
||||
/**
|
||||
* @see _.chain
|
||||
*/
|
||||
chain(): ObjectChain<T>;
|
||||
}
|
||||
interface Primitive<T> {
|
||||
/**
|
||||
* @see _.chain
|
||||
*/
|
||||
chain(): PrimitiveChain<T>;
|
||||
}
|
||||
interface Function<T extends (...args: any) => any> {
|
||||
/**
|
||||
* @see _.chain
|
||||
*/
|
||||
chain(): FunctionChain<T>;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.chain
|
||||
*/
|
||||
chain(): this;
|
||||
}
|
||||
// prototype.commit
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.commit
|
||||
*/
|
||||
commit(): this;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.commit
|
||||
*/
|
||||
commit(): this;
|
||||
}
|
||||
// prototype.plant
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.plant
|
||||
*/
|
||||
plant(value: unknown): this;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.plant
|
||||
*/
|
||||
plant(value: unknown): this;
|
||||
}
|
||||
// prototype.reverse
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.reverse
|
||||
*/
|
||||
reverse(): this;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.reverse
|
||||
*/
|
||||
reverse(): this;
|
||||
}
|
||||
// prototype.toJSON
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.toJSON
|
||||
*/
|
||||
toJSON(): TValue;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.toJSON
|
||||
*/
|
||||
toJSON(): TValue;
|
||||
}
|
||||
// prototype.toString
|
||||
interface LoDashWrapper<TValue> {
|
||||
/**
|
||||
* @see _.toString
|
||||
*/
|
||||
toString(): string;
|
||||
}
|
||||
// prototype.value
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.value
|
||||
*/
|
||||
value(): TValue;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.value
|
||||
*/
|
||||
value(): TValue;
|
||||
}
|
||||
// prototype.valueOf
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.valueOf
|
||||
*/
|
||||
valueOf(): TValue;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.valueOf
|
||||
*/
|
||||
valueOf(): TValue;
|
||||
}
|
||||
// tap
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* This method invokes interceptor and returns value. The interceptor is invoked with one
|
||||
* argument; (value). The purpose of this method is to "tap into" a method chain in order to perform operations
|
||||
* on intermediate results within the chain.
|
||||
*
|
||||
* @param value The value to provide to interceptor.
|
||||
* @param interceptor The function to invoke.
|
||||
* @return Returns value.
|
||||
*/
|
||||
tap<T>(value: T, interceptor: (value: T) => void): T;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.tap
|
||||
*/
|
||||
tap(interceptor: (value: TValue) => void): this;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.tap
|
||||
*/
|
||||
tap(interceptor: (value: TValue) => void): this;
|
||||
}
|
||||
// thru
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* This method is like _.tap except that it returns the result of interceptor.
|
||||
*
|
||||
* @param value The value to provide to interceptor.
|
||||
* @param interceptor The function to invoke.
|
||||
* @return Returns the result of interceptor.
|
||||
*/
|
||||
thru<T, TResult>(value: T, interceptor: (value: T) => TResult): TResult;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.thru
|
||||
*/
|
||||
thru<TResult>(interceptor: (value: TValue) => TResult): ImpChain<TResult>;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.thru
|
||||
*/
|
||||
thru<TResult>(interceptor: (value: TValue) => TResult): ExpChain<TResult>;
|
||||
}
|
||||
}
|
||||
+788
@@ -0,0 +1,788 @@
|
||||
import _ = require("../index");
|
||||
declare module "../index" {
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Converts string to camel case.
|
||||
*
|
||||
* @param string The string to convert.
|
||||
* @return Returns the camel cased string.
|
||||
*/
|
||||
camelCase(string?: string): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.camelCase
|
||||
*/
|
||||
camelCase(): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.camelCase
|
||||
*/
|
||||
camelCase(): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Converts the first character of string to upper case and the remaining to lower case.
|
||||
*
|
||||
* @param string The string to capitalize.
|
||||
* @return Returns the capitalized string.
|
||||
*/
|
||||
capitalize(string?: string): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.capitalize
|
||||
*/
|
||||
capitalize(): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.capitalize
|
||||
*/
|
||||
capitalize(): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Deburrs string by converting latin-1 supplementary letters to basic latin letters and removing combining
|
||||
* diacritical marks.
|
||||
*
|
||||
* @param string The string to deburr.
|
||||
* @return Returns the deburred string.
|
||||
*/
|
||||
deburr(string?: string): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.deburr
|
||||
*/
|
||||
deburr(): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.deburr
|
||||
*/
|
||||
deburr(): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Checks if string ends with the given target string.
|
||||
*
|
||||
* @param string The string to search.
|
||||
* @param target The string to search for.
|
||||
* @param position The position to search from.
|
||||
* @return Returns true if string ends with target, else false.
|
||||
*/
|
||||
endsWith(string?: string, target?: string, position?: number): boolean;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.endsWith
|
||||
*/
|
||||
endsWith(target?: string, position?: number): boolean;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.endsWith
|
||||
*/
|
||||
endsWith(target?: string, position?: number): PrimitiveChain<boolean>;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Converts the characters "&", "<", ">", '"', "'", and "`" in string to their corresponding HTML entities.
|
||||
*
|
||||
* Note: No other characters are escaped. To escape additional characters use a third-party library like he.
|
||||
*
|
||||
* hough the ">" character is escaped for symmetry, characters like ">" and "/" don’t need escaping in HTML
|
||||
* and have no special meaning unless they're part of a tag or unquoted attribute value. See Mathias Bynens’s
|
||||
* article (under "semi-related fun fact") for more details.
|
||||
*
|
||||
* Backticks are escaped because in IE < 9, they can break out of attribute values or HTML comments. See #59,
|
||||
* #102, #108, and #133 of the HTML5 Security Cheatsheet for more details.
|
||||
*
|
||||
* When working with HTML you should always quote attribute values to reduce XSS vectors.
|
||||
*
|
||||
* @param string The string to escape.
|
||||
* @return Returns the escaped string.
|
||||
*/
|
||||
escape(string?: string): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.escape
|
||||
*/
|
||||
escape(): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.escape
|
||||
*/
|
||||
escape(): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Escapes the RegExp special characters "^", "$", "\", ".", "*", "+", "?", "(", ")", "[", "]",
|
||||
* "{", "}", and "|" in string.
|
||||
*
|
||||
* @param string The string to escape.
|
||||
* @return Returns the escaped string.
|
||||
*/
|
||||
escapeRegExp(string?: string): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.escapeRegExp
|
||||
*/
|
||||
escapeRegExp(): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.escapeRegExp
|
||||
*/
|
||||
escapeRegExp(): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Converts string to kebab case.
|
||||
*
|
||||
* @param string The string to convert.
|
||||
* @return Returns the kebab cased string.
|
||||
*/
|
||||
kebabCase(string?: string): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.kebabCase
|
||||
*/
|
||||
kebabCase(): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.kebabCase
|
||||
*/
|
||||
kebabCase(): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Converts `string`, as space separated words, to lower case.
|
||||
*
|
||||
* @param string The string to convert.
|
||||
* @return Returns the lower cased string.
|
||||
*/
|
||||
lowerCase(string?: string): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.lowerCase
|
||||
*/
|
||||
lowerCase(): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.lowerCase
|
||||
*/
|
||||
lowerCase(): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Converts the first character of `string` to lower case.
|
||||
*
|
||||
* @param string The string to convert.
|
||||
* @return Returns the converted string.
|
||||
*/
|
||||
lowerFirst(string?: string): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.lowerFirst
|
||||
*/
|
||||
lowerFirst(): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.lowerFirst
|
||||
*/
|
||||
lowerFirst(): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Pads string on the left and right sides if it’s shorter than length. Padding characters are truncated if
|
||||
* they can’t be evenly divided by length.
|
||||
*
|
||||
* @param string The string to pad.
|
||||
* @param length The padding length.
|
||||
* @param chars The string used as padding.
|
||||
* @return Returns the padded string.
|
||||
*/
|
||||
pad(string?: string, length?: number, chars?: string): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.pad
|
||||
*/
|
||||
pad(length?: number, chars?: string): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.pad
|
||||
*/
|
||||
pad(length?: number, chars?: string): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Pads string on the right side if it’s shorter than length. Padding characters are truncated if they exceed
|
||||
* length.
|
||||
*
|
||||
* @param string The string to pad.
|
||||
* @param length The padding length.
|
||||
* @param chars The string used as padding.
|
||||
* @return Returns the padded string.
|
||||
*/
|
||||
padEnd(string?: string, length?: number, chars?: string): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.padEnd
|
||||
*/
|
||||
padEnd(length?: number, chars?: string): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.padEnd
|
||||
*/
|
||||
padEnd(length?: number, chars?: string): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Pads string on the left side if it’s shorter than length. Padding characters are truncated if they exceed
|
||||
* length.
|
||||
*
|
||||
* @param string The string to pad.
|
||||
* @param length The padding length.
|
||||
* @param chars The string used as padding.
|
||||
* @return Returns the padded string.
|
||||
*/
|
||||
padStart(string?: string, length?: number, chars?: string): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.padStart
|
||||
*/
|
||||
padStart(length?: number, chars?: string): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.padStart
|
||||
*/
|
||||
padStart(length?: number, chars?: string): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Converts string to an integer of the specified radix. If radix is undefined or 0, a radix of 10 is used
|
||||
* unless value is a hexadecimal, in which case a radix of 16 is used.
|
||||
*
|
||||
* Note: This method aligns with the ES5 implementation of parseInt.
|
||||
*
|
||||
* @param string The string to convert.
|
||||
* @param radix The radix to interpret value by.
|
||||
* @return Returns the converted integer.
|
||||
*/
|
||||
parseInt(string: string, radix?: number): number;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.parseInt
|
||||
*/
|
||||
parseInt(radix?: number): number;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.parseInt
|
||||
*/
|
||||
parseInt(radix?: number): PrimitiveChain<number>;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Repeats the given string n times.
|
||||
*
|
||||
* @param string The string to repeat.
|
||||
* @param n The number of times to repeat the string.
|
||||
* @return Returns the repeated string.
|
||||
*/
|
||||
repeat(string?: string, n?: number): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.repeat
|
||||
*/
|
||||
repeat(n?: number): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.repeat
|
||||
*/
|
||||
repeat(n?: number): StringChain;
|
||||
}
|
||||
type ReplaceFunction = (match: string, ...args: any[]) => string;
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Replaces matches for pattern in string with replacement.
|
||||
*
|
||||
* Note: This method is based on String#replace.
|
||||
*
|
||||
* @return Returns the modified string.
|
||||
*/
|
||||
replace(string: string, pattern: RegExp | string, replacement: ReplaceFunction | string): string;
|
||||
/**
|
||||
* @see _.replace
|
||||
*/
|
||||
replace(pattern: RegExp | string, replacement: ReplaceFunction | string): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.replace
|
||||
*/
|
||||
replace(pattern: RegExp | string, replacement: ReplaceFunction | string): string;
|
||||
/**
|
||||
* @see _.replace
|
||||
*/
|
||||
replace(replacement: ReplaceFunction | string): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.replace
|
||||
*/
|
||||
replace(pattern: RegExp | string, replacement: ReplaceFunction | string): StringChain;
|
||||
/**
|
||||
* @see _.replace
|
||||
*/
|
||||
replace(replacement: ReplaceFunction | string): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Converts string to snake case.
|
||||
*
|
||||
* @param string The string to convert.
|
||||
* @return Returns the snake cased string.
|
||||
*/
|
||||
snakeCase(string?: string): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.snakeCase
|
||||
*/
|
||||
snakeCase(): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.snakeCase
|
||||
*/
|
||||
snakeCase(): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Splits string by separator.
|
||||
*
|
||||
* Note: This method is based on String#split.
|
||||
*
|
||||
* @param string The string to trim.
|
||||
* @param separator The separator pattern to split by.
|
||||
* @param limit The length to truncate results to.
|
||||
* @return Returns the new array of string segments.
|
||||
*/
|
||||
split(string: string, separator?: RegExp | string, limit?: number): string[];
|
||||
/**
|
||||
* @see _.split
|
||||
*/
|
||||
split(string: string, index: string | number, guard: object): string[];
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.split
|
||||
*/
|
||||
split(separator?: RegExp | string, limit?: number): Collection<string>;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.split
|
||||
*/
|
||||
split(separator?: RegExp | string, limit?: number): CollectionChain<string>;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Converts string to start case.
|
||||
*
|
||||
* @param string The string to convert.
|
||||
* @return Returns the start cased string.
|
||||
*/
|
||||
startCase(string?: string): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.startCase
|
||||
*/
|
||||
startCase(): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.startCase
|
||||
*/
|
||||
startCase(): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Checks if string starts with the given target string.
|
||||
*
|
||||
* @param string The string to search.
|
||||
* @param target The string to search for.
|
||||
* @param position The position to search from.
|
||||
* @return Returns true if string starts with target, else false.
|
||||
*/
|
||||
startsWith(string?: string, target?: string, position?: number): boolean;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.startsWith
|
||||
*/
|
||||
startsWith(target?: string, position?: number): boolean;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.startsWith
|
||||
*/
|
||||
startsWith(target?: string, position?: number): PrimitiveChain<boolean>;
|
||||
}
|
||||
|
||||
interface TemplateOptions extends TemplateSettings {
|
||||
/**
|
||||
* @see _.sourceURL
|
||||
*/
|
||||
sourceURL?: string;
|
||||
}
|
||||
interface TemplateExecutor {
|
||||
(data?: object): string;
|
||||
/**
|
||||
* @see _.source
|
||||
*/
|
||||
source: string;
|
||||
}
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Creates a compiled template function that can interpolate data properties in "interpolate" delimiters,
|
||||
* HTML-escape interpolated data properties in "escape" delimiters, and execute JavaScript in "evaluate"
|
||||
* delimiters. Data properties may be accessed as free variables in the template. If a setting object is
|
||||
* provided it takes precedence over _.templateSettings values.
|
||||
*
|
||||
* Note: In the development build _.template utilizes
|
||||
* [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) for easier
|
||||
* debugging.
|
||||
*
|
||||
* For more information on precompiling templates see
|
||||
* [lodash's custom builds documentation](https://lodash.com/custom-builds).
|
||||
*
|
||||
* For more information on Chrome extension sandboxes see
|
||||
* [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
|
||||
*
|
||||
* @param string The template string.
|
||||
* @param options The options object.
|
||||
* @param options.escape The HTML "escape" delimiter.
|
||||
* @param options.evaluate The "evaluate" delimiter.
|
||||
* @param options.imports An object to import into the template as free variables.
|
||||
* @param options.interpolate The "interpolate" delimiter.
|
||||
* @param options.sourceURL The sourceURL of the template's compiled source.
|
||||
* @param options.variable The data object variable name.
|
||||
* @return Returns the compiled template function.
|
||||
*/
|
||||
template(string?: string, options?: TemplateOptions): TemplateExecutor;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.template
|
||||
*/
|
||||
template(options?: TemplateOptions): TemplateExecutor;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.template
|
||||
*/
|
||||
template(options?: TemplateOptions): FunctionChain<TemplateExecutor>;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Converts `string`, as a whole, to lower case.
|
||||
*
|
||||
* @param string The string to convert.
|
||||
* @return Returns the lower cased string.
|
||||
*/
|
||||
toLower(string?: string): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.toLower
|
||||
*/
|
||||
toLower(): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.toLower
|
||||
*/
|
||||
toLower(): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Converts `string`, as a whole, to upper case.
|
||||
*
|
||||
* @param string The string to convert.
|
||||
* @return Returns the upper cased string.
|
||||
*/
|
||||
toUpper(string?: string): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.toUpper
|
||||
*/
|
||||
toUpper(): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.toUpper
|
||||
*/
|
||||
toUpper(): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Removes leading and trailing whitespace or specified characters from string.
|
||||
*
|
||||
* @param string The string to trim.
|
||||
* @param chars The characters to trim.
|
||||
* @return Returns the trimmed string.
|
||||
*/
|
||||
trim(string?: string, chars?: string): string;
|
||||
/**
|
||||
* @see _.trim
|
||||
*/
|
||||
trim(string: string, index: string | number, guard: object): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.trim
|
||||
*/
|
||||
trim(chars?: string): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.trim
|
||||
*/
|
||||
trim(chars?: string): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Removes trailing whitespace or specified characters from string.
|
||||
*
|
||||
* @param string The string to trim.
|
||||
* @param chars The characters to trim.
|
||||
* @return Returns the trimmed string.
|
||||
*/
|
||||
trimEnd(string?: string, chars?: string): string;
|
||||
/**
|
||||
* @see _.trimEnd
|
||||
*/
|
||||
trimEnd(string: string, index: string | number, guard: object): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.trimEnd
|
||||
*/
|
||||
trimEnd(chars?: string): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.trimEnd
|
||||
*/
|
||||
trimEnd(chars?: string): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Removes leading whitespace or specified characters from string.
|
||||
*
|
||||
* @param string The string to trim.
|
||||
* @param chars The characters to trim.
|
||||
* @return Returns the trimmed string.
|
||||
*/
|
||||
trimStart(string?: string, chars?: string): string;
|
||||
/**
|
||||
* @see _.trimStart
|
||||
*/
|
||||
trimStart(string: string, index: string | number, guard: object): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.trimStart
|
||||
*/
|
||||
trimStart(chars?: string): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.trimStart
|
||||
*/
|
||||
trimStart(chars?: string): StringChain;
|
||||
}
|
||||
|
||||
interface TruncateOptions {
|
||||
/**
|
||||
* @see _.length
|
||||
*/
|
||||
length?: number;
|
||||
/**
|
||||
* @see _.omission
|
||||
*/
|
||||
omission?: string;
|
||||
/**
|
||||
* @see _.separator
|
||||
*/
|
||||
separator?: string | RegExp;
|
||||
}
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Truncates string if it’s longer than the given maximum string length. The last characters of the truncated
|
||||
* string are replaced with the omission string which defaults to "…".
|
||||
*
|
||||
* @param string The string to truncate.
|
||||
* @param options The options object or maximum string length.
|
||||
* @return Returns the truncated string.
|
||||
*/
|
||||
truncate(string?: string, options?: TruncateOptions): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.truncate
|
||||
*/
|
||||
truncate(options?: TruncateOptions): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.truncate
|
||||
*/
|
||||
truncate(options?: TruncateOptions): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* The inverse of _.escape; this method converts the HTML entities &, <, >, ", ', and `
|
||||
* in string to their corresponding characters.
|
||||
*
|
||||
* Note: No other HTML entities are unescaped. To unescape additional HTML entities use a third-party library
|
||||
* like he.
|
||||
*
|
||||
* @param string The string to unescape.
|
||||
* @return Returns the unescaped string.
|
||||
*/
|
||||
unescape(string?: string): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.unescape
|
||||
*/
|
||||
unescape(): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.unescape
|
||||
*/
|
||||
unescape(): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Converts `string`, as space separated words, to upper case.
|
||||
*
|
||||
* @param string The string to convert.
|
||||
* @return Returns the upper cased string.
|
||||
*/
|
||||
upperCase(string?: string): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.upperCase
|
||||
*/
|
||||
upperCase(): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.upperCase
|
||||
*/
|
||||
upperCase(): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Converts the first character of `string` to upper case.
|
||||
*
|
||||
* @param string The string to convert.
|
||||
* @return Returns the converted string.
|
||||
*/
|
||||
upperFirst(string?: string): string;
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.upperFirst
|
||||
*/
|
||||
upperFirst(): string;
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.upperFirst
|
||||
*/
|
||||
upperFirst(): StringChain;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Splits `string` into an array of its words.
|
||||
*
|
||||
* @param string The string to inspect.
|
||||
* @param pattern The pattern to match words.
|
||||
* @return Returns the words of `string`.
|
||||
*/
|
||||
words(string?: string, pattern?: string | RegExp): string[];
|
||||
/**
|
||||
* @see _.words
|
||||
*/
|
||||
words(string: string, index: string | number, guard: object): string[];
|
||||
}
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.words
|
||||
*/
|
||||
words(pattern?: string | RegExp): string[];
|
||||
}
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.words
|
||||
*/
|
||||
words(pattern?: string | RegExp): CollectionChain<string>;
|
||||
}
|
||||
}
|
||||
Vendored
+1161
File diff suppressed because it is too large
Load Diff
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { compact } from "./index";
|
||||
export = compact;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { concat } from "./index";
|
||||
export = concat;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { cond } from "./index";
|
||||
export = cond;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { conformsTo } from "./index";
|
||||
export = conformsTo;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { constant } from "./index";
|
||||
export = constant;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { countBy } from "./index";
|
||||
export = countBy;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { create } from "./index";
|
||||
export = create;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { curry } from "./index";
|
||||
export = curry;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { curryRight } from "./index";
|
||||
export = curryRight;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { debounce } from "./index";
|
||||
export = debounce;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { deburr } from "./index";
|
||||
export = deburr;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { defaultTo } from "./index";
|
||||
export = defaultTo;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { defaults } from "./index";
|
||||
export = defaults;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { defaultsDeep } from "./index";
|
||||
export = defaultsDeep;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { defer } from "./index";
|
||||
export = defer;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { delay } from "./index";
|
||||
export = delay;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { difference } from "./index";
|
||||
export = difference;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { differenceBy } from "./index";
|
||||
export = differenceBy;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { differenceWith } from "./index";
|
||||
export = differenceWith;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { divide } from "./index";
|
||||
export = divide;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { drop } from "./index";
|
||||
export = drop;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { dropRight } from "./index";
|
||||
export = dropRight;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { dropRightWhile } from "./index";
|
||||
export = dropRightWhile;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { dropWhile } from "./index";
|
||||
export = dropWhile;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { each } from "./index";
|
||||
export = each;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { eachRight } from "./index";
|
||||
export = eachRight;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { endsWith } from "./index";
|
||||
export = endsWith;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { entries } from "./index";
|
||||
export = entries;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { entriesIn } from "./index";
|
||||
export = entriesIn;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { eq } from "./index";
|
||||
export = eq;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { escape } from "./index";
|
||||
export = escape;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { escapeRegExp } from "./index";
|
||||
export = escapeRegExp;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { every } from "./index";
|
||||
export = every;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { extend } from "./index";
|
||||
export = extend;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { extendWith } from "./index";
|
||||
export = extendWith;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { fill } from "./index";
|
||||
export = fill;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { filter } from "./index";
|
||||
export = filter;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { find } from "./index";
|
||||
export = find;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { findIndex } from "./index";
|
||||
export = findIndex;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { findKey } from "./index";
|
||||
export = findKey;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { findLast } from "./index";
|
||||
export = findLast;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { findLastIndex } from "./index";
|
||||
export = findLastIndex;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { findLastKey } from "./index";
|
||||
export = findLastKey;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { first } from "./index";
|
||||
export = first;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { flatMap } from "./index";
|
||||
export = flatMap;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { flatMapDeep } from "./index";
|
||||
export = flatMapDeep;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { flatMapDepth } from "./index";
|
||||
export = flatMapDepth;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { flatten } from "./index";
|
||||
export = flatten;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { flattenDeep } from "./index";
|
||||
export = flattenDeep;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { flattenDepth } from "./index";
|
||||
export = flattenDepth;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { flip } from "./index";
|
||||
export = flip;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { floor } from "./index";
|
||||
export = floor;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { flow } from "./index";
|
||||
export = flow;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { flowRight } from "./index";
|
||||
export = flowRight;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { forEach } from "./index";
|
||||
export = forEach;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { forEachRight } from "./index";
|
||||
export = forEachRight;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { forIn } from "./index";
|
||||
export = forIn;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { forInRight } from "./index";
|
||||
export = forInRight;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { forOwn } from "./index";
|
||||
export = forOwn;
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { forOwnRight } from "./index";
|
||||
export = forOwnRight;
|
||||
Vendored
+4628
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user