From 7c62c36edacc6d7ced5d40ed0d622b00bb1906f7 Mon Sep 17 00:00:00 2001 From: Hamlet D'Arcy Date: Mon, 18 Dec 2017 08:08:38 +0100 Subject: [PATCH 01/19] #0000 Pinning tsutils dependency to version 2.7.1 until we upgrade typescript --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 567f57aba..7f8f255cb 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "test": "grunt all" }, "dependencies": { - "tsutils": "^2.7.1" + "tsutils": "2.7.1" }, "devDependencies": { "chai": "3.2.0", From 668fdfab6e76814ad4e96e077701f0869c2b67dd Mon Sep 17 00:00:00 2001 From: Rogier Schouten Date: Fri, 4 Aug 2017 17:25:43 +0200 Subject: [PATCH 02/19] #386 Add 'typescript' to peer dependencies using the versions also supported by tslint 5.1. closes #386 change dependency version ranges to be more future-proof --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 7f8f255cb..4cabf6078 100644 --- a/package.json +++ b/package.json @@ -55,6 +55,7 @@ "underscore": "1.8.3" }, "peerDependencies": { - "tslint": ">=5.1.0" + "tslint": "^5.1.0", + "typescript": "^2.1.0" } } From 885fc33d2063c6171d59afb73065709a1e5c2da2 Mon Sep 17 00:00:00 2001 From: Bowen Ni Date: Thu, 19 Oct 2017 15:42:06 -0700 Subject: [PATCH 03/19] #399 Use ReadonlyArray for node arrays closes #399 --- src/noUnnecessaryOverrideRule.ts | 2 +- src/utils/JsxAttribute.ts | 4 ++-- src/utils/Scope.ts | 2 +- src/utils/Utils.ts | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/noUnnecessaryOverrideRule.ts b/src/noUnnecessaryOverrideRule.ts index a89d306fb..d6bb06d0c 100644 --- a/src/noUnnecessaryOverrideRule.ts +++ b/src/noUnnecessaryOverrideRule.ts @@ -63,7 +63,7 @@ class NoUnnecessaryOverrideRuleWalker extends ErrorTolerantWalker { return false; // different param list lengths means they do not match } - const allParameters: ts.ParameterDeclaration[] = node.parameters; + const allParameters: ReadonlyArray = node.parameters; /* tslint:disable:no-increment-decrement */ for (let i = 0; i < allParameters.length; i++) { /* tslint:enable:no-increment-decrement */ diff --git a/src/utils/JsxAttribute.ts b/src/utils/JsxAttribute.ts index 75b594fff..222b1a310 100644 --- a/src/utils/JsxAttribute.ts +++ b/src/utils/JsxAttribute.ts @@ -142,10 +142,10 @@ export function getNumericLiteral(node: ts.JsxAttribute): string { * It contains JsxAttribute and JsxSpreadAttribute. */ export function getAllAttributesFromJsxElement(node: ts.Node): ts.NodeArray { - let attributes: ts.NodeArray; + let attributes: ts.NodeArray = null; if (node == null) { - return >[]; + return attributes; } else if (isJsxElement(node)) { attributes = node.openingElement.attributes.properties; } else if (isJsxSelfClosingElement(node)) { diff --git a/src/utils/Scope.ts b/src/utils/Scope.ts index 4ac2d69a1..de2bfe39b 100644 --- a/src/utils/Scope.ts +++ b/src/utils/Scope.ts @@ -35,7 +35,7 @@ export class Scope { return false; } - public addParameters(parameters: ts.ParameterDeclaration[]): void { + public addParameters(parameters: ReadonlyArray): void { parameters.forEach((parm: ts.ParameterDeclaration): void => { if (AstUtils.isDeclarationFunctionType(parm)) { this.addFunctionSymbol(parm.name.getText()); diff --git a/src/utils/Utils.ts b/src/utils/Utils.ts index da0d03b2d..46e37887e 100644 --- a/src/utils/Utils.ts +++ b/src/utils/Utils.ts @@ -6,7 +6,7 @@ export module Utils { /** * Logical 'any' or 'exists' function. */ - export function exists(list : T[], predicate: (t: T) => boolean) : boolean { + export function exists(list : ReadonlyArray, predicate: (t: T) => boolean) : boolean { if (list != null ) { for (let i = 0; i < list.length; i++) { const obj : T = list[i]; @@ -21,7 +21,7 @@ export module Utils { /** * A contains function. */ - export function contains(list: T[], element: T): boolean { + export function contains(list: ReadonlyArray, element: T): boolean { return exists(list, (item: T): boolean => { return item === element; }); @@ -30,7 +30,7 @@ export module Utils { /** * A removeAll function. */ - export function removeAll(source: T[], elementsToRemove: T[]): T[] { + export function removeAll(source: ReadonlyArray, elementsToRemove: ReadonlyArray): T[] { if (source == null || source.length === 0) { return []; } @@ -46,7 +46,7 @@ export module Utils { /** * A remove() function. */ - export function remove(source: T[], elementToRemove: T): T[] { + export function remove(source: ReadonlyArray, elementToRemove: T): T[] { return removeAll(source, [elementToRemove]); } From 760c98fda7cfbaa34501eaffa37fa0c244794669 Mon Sep 17 00:00:00 2001 From: Drew Dennison Date: Mon, 13 Nov 2017 16:51:51 -0800 Subject: [PATCH 04/19] #401 generate rule-metadata.json which contains all rule metadata as a json array for use in other tools closes #401 --- .gitignore | 1 + Gruntfile.js | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/.gitignore b/.gitignore index 2b93b5d6b..1f274d955 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ tslint-microsoft-contrib.iml .npm_cache out.html +rule-metadata.json diff --git a/Gruntfile.js b/Gruntfile.js index 8b6f9f5f3..072b0e157 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -384,6 +384,18 @@ module.exports = function(grunt) { }); + grunt.registerTask('generate-rule-metadata', 'A task that generates rule-metadata.json which contains a json array of all rule metadata', function () { + + const allMetadata = [] + + getAllRules().forEach(function(ruleFile) { + const metadata = getMetadataFromFile(ruleFile) + allMetadata.push(metadata) + }) + + grunt.file.write('rule-metadata.json', JSON.stringify(allMetadata, null, 2), {encoding: 'UTF-8'}); + }); + grunt.registerTask('generate-recommendations', 'A task that generates the recommended_ruleset.js file', function () { const groupedRows = {}; @@ -476,6 +488,7 @@ module.exports = function(grunt) { 'generate-recommendations', 'generate-default-tslint-json', 'generate-sdl-report', + 'generate-rule-metadata', 'create-package-json-for-npm' ]); From 590653f2fd3464e037511b31444fb06dfcc82fb9 Mon Sep 17 00:00:00 2001 From: Tobias Date: Thu, 16 Nov 2017 14:32:54 +0100 Subject: [PATCH 05/19] #402 fix false positive for function expressions in no-string-based-set-timeout closes #402 --- src/tests/NoStringBasedSetTimeoutTests.ts | 12 ++++++++++++ src/utils/ScopedSymbolTrackingWalker.ts | 10 ++++++++++ .../NoStringBasedSetTimeoutTestInput-case4.ts | 10 ++++++++++ 3 files changed, 32 insertions(+) create mode 100644 test-data/NoStringBasedSetTimeout/NoStringBasedSetTimeoutTestInput-case4.ts diff --git a/src/tests/NoStringBasedSetTimeoutTests.ts b/src/tests/NoStringBasedSetTimeoutTests.ts index 11cc8ada7..4d4474f43 100644 --- a/src/tests/NoStringBasedSetTimeoutTests.ts +++ b/src/tests/NoStringBasedSetTimeoutTests.ts @@ -323,4 +323,16 @@ describe('noStringBasedSetTimeoutRule', () : void => { ]); }); + it('should produce violation for string variable - case 4', () : void => { + const inputFile : string = 'test-data/NoStringBasedSetTimeout/NoStringBasedSetTimeoutTestInput-case4.ts'; + TestHelper.assertViolationsWithTypeChecker(RULE_NAME, inputFile, [ + { + ruleName: 'no-string-based-set-timeout', + failure: 'Forbidden setTimeout string parameter: typedStringVariable', + name: 'test-data/NoStringBasedSetTimeout/NoStringBasedSetTimeoutTestInput-case4.ts', + startPosition: { line: 9, character: 5 } + } + ]); + }); + }); \ No newline at end of file diff --git a/src/utils/ScopedSymbolTrackingWalker.ts b/src/utils/ScopedSymbolTrackingWalker.ts index 522c7cdc3..ede884343 100644 --- a/src/utils/ScopedSymbolTrackingWalker.ts +++ b/src/utils/ScopedSymbolTrackingWalker.ts @@ -166,4 +166,14 @@ export class ScopedSymbolTrackingWalker extends ErrorTolerantWalker { super.visitSetAccessor(node); this.scope = this.scope.parent; } + + protected visitVariableDeclaration(node: ts.VariableDeclaration): void { + if (AstUtils.isDeclarationFunctionType(node)) { + this.scope.addFunctionSymbol(node.name.getText()); + } else { + this.scope.addNonFunctionSymbol(node.name.getText()); + } + super.visitVariableDeclaration(node); + } + } diff --git a/test-data/NoStringBasedSetTimeout/NoStringBasedSetTimeoutTestInput-case4.ts b/test-data/NoStringBasedSetTimeout/NoStringBasedSetTimeoutTestInput-case4.ts new file mode 100644 index 000000000..c67939e07 --- /dev/null +++ b/test-data/NoStringBasedSetTimeout/NoStringBasedSetTimeoutTestInput-case4.ts @@ -0,0 +1,10 @@ +var function1 = (() => { + var functionVariable = () => {}; + var typedStringVariable = 'string variable'; + + // expressions of type function are OK + setTimeout(functionVariable); + + // this should create violation + setTimeout(typedStringVariable); +}); From e95cead4804d0e02bcddc650c3a92cc8c375e4c9 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Wed, 6 Dec 2017 10:38:34 -0800 Subject: [PATCH 06/19] #405, #400 Deprecated duplicate rules closes #400. closes #405 --- README.md | 22 ++++++++++----------- src/functionNameRule.ts | 6 ++++++ src/missingJsdocRule.ts | 6 ++++++ src/noDuplicateCaseRule.ts | 7 +++++++ src/noEmptyInterfacesRule.ts | 6 ++++++ src/noReservedKeywordsRule.ts | 6 ++++++ src/noUnnecessaryFieldInitializationRule.ts | 7 +++++++ src/preferArrayLiteralRule.ts | 6 ++++++ src/preferTypeCastRule.ts | 7 +++++++ src/promiseMustCompleteRule.ts | 7 +++++++ src/reactTsxCurlySpacingRule.ts | 7 +++++++ src/validTypeofRule.ts | 6 ++++++ 12 files changed, 82 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 145cc421c..57363d0c7 100644 --- a/README.md +++ b/README.md @@ -76,12 +76,12 @@ Rule Name | Description | Since `chai-prefer-contains-to-index-of` | Avoid Chai assertions that invoke indexOf and compare for a -1 result. It is better to use the chai .contain() assertion API instead because the failure message will be more clearer if the test fails. | 2.0.10 `chai-vague-errors` | Avoid Chai assertions that result in vague errors. For example, asserting `expect(something).to.be.true` will result in the failure message "Expected true received false". This is a vague error message that does not reveal the underlying problem. It is especially vague in TypeScript because stack trace line numbers often do not match the source code. A better pattern to follow is the xUnit Patterns [Assertion Message](http://xunitpatterns.com/Assertion%20Message.html) pattern. The previous code sample could be better written as `expect(something).to.equal(true, 'expected something to have occurred');`| 1.0 `export-name` | The name of the exported module must match the filename of the source file. This is case-sensitive but ignores file extension. Since version 1.0, this rule takes a list of regular expressions as a parameter. Any export name matching that regular expression will be ignored. For example, to allow an exported name like myChartOptions, then configure the rule like this: "export-name": \[true, "myChartOptionsg"\]| 0.0.3 -`function-name` | Applies a naming convention to function names and method names. You can configure the naming convention by passing parameters. Please note, the private-method-regex does take precedence over the static-method-regex, so a private static method must match the private-method-regex. The default values are:
[ true, {
"method-regex": "^[a-z][\\w\\d]+$",
"private-method-regex": "^[a-z][\\w\\d]+$",
"protected-method-regex": "^[a-z][\\w\\d]+$",
"static-method-regex": "^[A-Z_\\d]+$",
"function-regex": "^[a-z][\\w\\d]+$"
}] | 2.0.7, 2.0.14 +`function-name` | Deprecated - This rule can be replaced with TSLint's variable-name. Applies a naming convention to function names and method names. You can configure the naming convention by passing parameters. Please note, the private-method-regex does take precedence over the static-method-regex, so a private static method must match the private-method-regex. The default values are:
[ true, {
"method-regex": "^[a-z][\\w\\d]+$",
"private-method-regex": "^[a-z][\\w\\d]+$",
"protected-method-regex": "^[a-z][\\w\\d]+$",
"static-method-regex": "^[A-Z_\\d]+$",
"function-regex": "^[a-z][\\w\\d]+$"
}] | 2.0.7, 2.0.14 `import-name` | The name of the imported module must match the name of the thing being imported. For example, it is valid to name imported modules the same as the module name: `import Service = require('x/y/z/Service')` and `import Service from 'x/y/z/Service'`. But it is invalid to change the name being imported, such as: `import MyCoolService = require('x/y/z/Service')` and `import MyCoolService from 'x/y/z/Service'`. Since version 2.0.9 it is possible to configure this rule with a list of exceptions. For example, to allow `underscore` to be imported as `_`, add this configuration: `'import-name': [ true, { 'underscore': '_' }]`| 2.0.5 `insecure-random` | Do not use insecure sources for random bytes. Use a secure random number generator instead. Bans all uses of Math.random and crypto.pseudoRandomBytes. Better alternatives are crypto.randomBytes and window.crypto.getRandomValues.
References:
* [CWE 330](https://cwe.mitre.org/data/definitions/330.html)
* [MDN Math.random](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random)
* [Node.js crypto.randomBytes()](http://nodejs.org/api/crypto.html#crypto_crypto_randombytes_size_callback)
* [window.crypto.getRandomValues()](https://developer.mozilla.org/en-US/docs/Web/API/window.crypto.getRandomValues)
| 2.0.11 `jquery-deferred-must-complete` | When a JQuery Deferred instance is created, then either reject() or resolve() must be called on it within all code branches in the scope. For more examples see the [feature request](https://github.com/Microsoft/tslint-microsoft-contrib/issues/26). | 1.0 `max-func-body-length` | Avoid long functions. The line count of a function body must not exceed the value configured within this rule's options.
You can setup a general max function body length applied for every function/method/arrow function e.g. \[true, 30\] or set different maximum length for every type e.g. \[true, \{ "func-body-length": 10 , "func-expression-body-length": 10 , "arrow-body-length": 5, "method-body-length": 15, "ctor-body-length": 5 \}\]. To specify a function name whose parameters you can ignore for this rule, pass a regular expression as a string(this can be useful for Mocha users to ignore the describe() function). Since version 2.0.9, you can also ignore single- and multi-line comments from the total function length, eg. \[true, \{ "ignore-comments": true \}\] | 2.0.3 -`missing-jsdoc` | All files must have a top level [JSDoc](http://usejsdoc.org/) comment. A JSDoc comment starts with /** (not one more or one less asterisk) and a JSDoc at the 'top-level' appears without leading spaces. Trailing spaces are acceptable but not recommended. | 1.0 +`missing-jsdoc` | Deprecated - This rule can be replaced with TSLint's file-header. All files must have a top level [JSDoc](http://usejsdoc.org/) comment. A JSDoc comment starts with /** (not one more or one less asterisk) and a JSDoc at the 'top-level' appears without leading spaces. Trailing spaces are acceptable but not recommended. | 1.0 `missing-optional-annotation` | Deprecated - This rule is now enforced by the TypeScript compiler. A parameter that follows one or more parameters marked as optional is not itself marked optional | 0.0.1 `mocha-avoid-only` | Do not invoke Mocha's describe.only, it.only or context.only functions. These functions are useful ways to run a single unit test or a single test case during your build, but please be careful to not push these methods calls to your version control repositiory because it will turn off any of the other tests.| 1.0 `mocha-no-side-effect-code` | All test logic in a Mocha test case should be within Mocha lifecycle method and not defined statically to execute when the module loads. Put all assignments and initialization statements in a before(), beforeEach(), beforeAll(), after(), afterEach(), afterAll(), or it() function. Code executed outside of these lifecycle methods can throw exceptions before the test runner is initialized and can result in errors or even test runner crashes. This rule can be configured with a regex to ignore certain initializations. For example, to ignore any calls to `RestDataFactory` configure the rule with: `[true, { ignore: '^RestDataFactory\\..*' }]`| 2.0.10 @@ -95,9 +95,9 @@ Rule Name | Description | Since `no-disable-auto-sanitization` | Do not disable auto-sanitization of HTML because this opens up your page to an XSS attack. Specifically, do not use the [execUnsafeLocalFunction](https://msdn.microsoft.com/en-us/library/windows/apps/hh767331.aspx) or [setInnerHTMLUnsafe](https://msdn.microsoft.com/en-us/library/windows/apps/br211696.aspx) functions. | 0.0.1 `no-document-domain` | Do not write to document.domain. Scripts setting document.domain to any value should be validated to ensure that the value is on a list of allowed sites. Also, if your site deals with PII in any way then document.domain must not be set to a top-level domain (for example, live.com) but only to an appropriate subdomain (for example, billing.live.com). If you are absolutely sure that you want to set document.domain then add a tslint suppression comment for the line. For more information see the [Phase 4 Verification page of the Microsoft SDL](https://msdn.microsoft.com/en-us/library/cc307418.aspx)| 2.0.3 `no-document-write` | Do not use document.write | 0.0.1 -`no-duplicate-case` | Do not use duplicate case labels in switch statements. Similar to the [ESLint no-duplicate-case](http://eslint.org/docs/rules/no-duplicate-case.html) rule | 1.0 +`no-duplicate-case` | Deprecated - This rule can be replaced with TSLint's no-duplicate-switch-case. Do not use duplicate case labels in switch statements. Similar to the [ESLint no-duplicate-case](http://eslint.org/docs/rules/no-duplicate-case.html) rule | 1.0 `no-duplicate-parameter-names` | Deprecated - This rule is now enforced by the TypeScript compiler. Do not write functions or methods with duplicate parameter names | 0.0.1 -`no-empty-interfaces` | Do not use empty interfaces. They are compile-time only artifacts and they serve no useful purpose | 1.0 +`no-empty-interfaces` | Deprecated - This rule can be replaced with TSLint's no-empty-interface. Do not use empty interfaces. They are compile-time only artifacts and they serve no useful purpose | 1.0 `no-empty-line-after-opening-brace` | Avoid an empty line after an opening brace. | 2.0.6 `no-exec-script` | Do not use the execScript functions | 0.0.1 `no-for-in` | Avoid use of for-in statements. They can be replaced by Object.keys | 1.0 @@ -114,7 +114,7 @@ Rule Name | Description | Since `no-octal-literal` | Do not use octal literals or escaped octal sequences | 0.0.1 `no-regex-spaces` | Do not use multiple spaces in a regular expression literal. Similar to the [ESLint no-regex-spaces](http://eslint.org/docs/rules/no-regex-spaces.html) rule | 1.0 `no-relative-imports` | Do not use relative paths when importing external modules or ES6 import declarations. The advantages of removing all relative paths from imports is that 1) the import name will be consistent across all files and subdirectories so searching for usages is much easier. 2) Moving source files to different folders will not require you to edit your import statements. 3) It will be possible to copy and paste import lines between files regardless of the file location. And 4) version control diffs will be simplified by having overall fewer edits to the import lines.| 2.0.5 -`no-reserved-keywords` | Do not use reserved keywords as names of local variables, fields, functions, or other identifiers. Since version 2.0.9 this rule accepts a parameter called allow-quoted-properties. If true, interface properties in quotes will be ignored. This can be a useful way to avoid verbose suppress-warning comments for generated d.ts files.| 0.0.1, 2.0.9 +`no-reserved-keywords` | Deprecated - This rule can be replaced with TSLint's variable-name. Do not use reserved keywords as names of local variables, fields, functions, or other identifiers. Since version 2.0.9 this rule accepts a parameter called allow-quoted-properties. If true, interface properties in quotes will be ignored. This can be a useful way to avoid verbose suppress-warning comments for generated d.ts files.| 0.0.1, 2.0.9 `no-single-line-block-comment` | Avoid single line block comments and use single line comments instead. Block comments do not nest properly and have no advantages over normal single-line comments| 2.0.10 `no-stateless-class` | A stateless class represents a failure in the object oriented design of the system. A class without state is better modeled as a module or given some state. A stateless class is defined as a class with only static members and no parent class.| 2.0.4 `no-string-based-set-immediate` | Do not use the version of setImmediate that accepts code as a string argument. However, it is acceptable to use the version of setImmediate where a direct reference to a function is provided as the callback argument | 0.0.1 @@ -124,7 +124,7 @@ Rule Name | Description | Since `no-typeof-undefined` | Do not use the idiom `typeof x === 'undefined'`. You can safely use the simpler `x === undefined` or perhaps `x == null` if you want to check for either null or undefined. | 2.0.8 `no-unexternalized-strings` | Ensures that double quoted strings are passed to a localize call to provide proper strings for different locales. The rule can be configured using an object literal as document in the [feature request](https://github.com/Microsoft/tslint-microsoft-contrib/issues/95#issuecomment-173149989)| 2.0.1 `no-unnecessary-bind` | Do not bind 'this' as the context for a function literal or lambda expression. If you bind 'this' as the context to a function literal, then you should just use a lambda without the bind. If you bind 'this' as the context to a lambda, then you can remove the bind call because 'this' is already the context for lambdas. Works for Underscore methods as well. | 1.0 -`no-unnecessary-field-initialization` | Do not unnecessarily initialize the fields of a class to values they already have. For example, there is no need to explicitly set a field to `undefined` in the field's initialization or in the class' constructor. Also, if a field is initialized to a constant value (null, a string, a boolean, or some number) then there is no need to reassign the field to this value within the class constructor. | 2.0.9 +`no-unnecessary-field-initialization` | Deprecated - This rule can be replaced with TSLint's no-unnecessary-initializer. Do not unnecessarily initialize the fields of a class to values they already have. For example, there is no need to explicitly set a field to `undefined` in the field's initialization or in the class' constructor. Also, if a field is initialized to a constant value (null, a string, a boolean, or some number) then there is no need to reassign the field to this value within the class constructor. | 2.0.9 `no-unnecessary-local-variable` | Do not declare a variable only to return it from the function on the next line. It is always less code to simply return the expression that initializes the variable. | 2.0.4 `no-unnecessary-override` | Do not write a method that only calls super() on the parent method with the same arguments. You can safely remove methods like this and Javascript will correctly dispatch the method to the parent object. | 2.0.4 `no-unnecessary-semicolons` | Remove unnecessary semicolons | 0.0.1 @@ -134,9 +134,9 @@ Rule Name | Description | Since `no-with-statement` | Do not use with statements. Assign the item to a new variable instead | 0.0.1 `non-literal-require` | Detect `require()` function calls for something that is not a string literal. For security reasons, it is best to only require() string literals. Otherwise, it is perhaps possible for an attacker to somehow change the value and download arbitrary Javascript into your page. | 2.0.14 `possible-timing-attack` | Avoid timing attacks by not making direct string comparisons to sensitive data. Do not compare against variables named password, secret, api, apiKey, token, auth, pass, or hash. For more info see [Using Node.js Event Loop for Timing Attacks](https://snyk.io/blog/node-js-timing-attack-ccc-ctf/) | 2.0.11 -`prefer-array-literal` | Use array literal syntax when declaring or instantiating array types. For example, prefer the Javascript form of string[] to the TypeScript form Array. Prefer '[]' to 'new Array()'. Prefer '[4, 5]' to 'new Array(4, 5)'. Prefer '[undefined, undefined]' to 'new Array(4)'. Since 2.0.10, this rule can be configured to allow Array type parameters. To ignore type parameters, configure the rule with the values: `[ true, { 'allow-type-parameters': true } ]`| 1.0, 2.0.10 -`prefer-type-cast` | Prefer the tradition type casts instead of the new 'as-cast' syntax. For example, prefer `myVariable` instead of `myVariable as string`. Rule ignores any file ending in .tsx. If you prefer the opposite and want to see the `as type` casts, then enable the tslint rule named 'no-angle-bracket-type-assertion'| 2.0.4 -`promise-must-complete` | When a Promise instance is created, then either the reject() or resolve() parameter must be called on it within all code branches in the scope. For more examples see the [feature request](https://github.com/Microsoft/tslint-microsoft-contrib/issues/34). | 1.0 +`prefer-array-literal` | Deprecated - This rule can be replaced with TSLint's array-type. Use array literal syntax when declaring or instantiating array types. For example, prefer the Javascript form of string[] to the TypeScript form Array. Prefer '[]' to 'new Array()'. Prefer '[4, 5]' to 'new Array(4, 5)'. Prefer '[undefined, undefined]' to 'new Array(4)'. Since 2.0.10, this rule can be configured to allow Array type parameters. To ignore type parameters, configure the rule with the values: `[ true, { 'allow-type-parameters': true } ]`| 1.0, 2.0.10 +`prefer-type-cast` | Deprecated - This rule can be replaced with TSLint's no-angle-bracket-type-assertion. Prefer the tradition type casts instead of the new 'as-cast' syntax. For example, prefer `myVariable` instead of `myVariable as string`. Rule ignores any file ending in .tsx. If you prefer the opposite and want to see the `as type` casts, then enable the tslint rule named 'no-angle-bracket-type-assertion'| 2.0.4 +`promise-must-complete` | Deprecated - This rule can be replaced with TSLint's no-floating-promises. When a Promise instance is created, then either the reject() or resolve() parameter must be called on it within all code branches in the scope. For more examples see the [feature request](https://github.com/Microsoft/tslint-microsoft-contrib/issues/34). | 1.0 `react-a11y-anchors` | For accessibility of your website, anchor element link text should be at least 4 characters long. Links with the same HREF should have the same link text. Links that point to different HREFs should have different link text. Links with images and text content, the alt attribute should be unique to the text content or empty. An an anchor element's href prop value must not be just #.
References:
[WCAG Rule 38: Link text should be as least four 4 characters long](http://oaa-accessibility.org/wcag20/rule/38/)
[WCAG Rule 39: Links with the same HREF should have the same link text](http://oaa-accessibility.org/wcag20/rule/39/)
[WCAG Rule 41: Links that point to different HREFs should have different link text](http://oaa-accessibility.org/wcag20/rule/41/)
[WCAG Rule 43: Links with images and text content, the alt attribute should be unique to the text content or empty](http://oaa-accessibility.org/wcag20/rule/43/)
| 2.0.11 `react-a11y-aria-unsupported-elements` | For accessibility of your website, enforce that elements that do not support ARIA roles, states, and properties do not have those attributes. | 2.0.11 `react-a11y-event-has-role` | For accessibility of your website, Elements with event handlers must have explicit role or implicit role.
References:
[WCAG Rule 94](http://oaa-accessibility.org/wcag20/rule/94/)
[Using the button role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_button_role) | 2.0.11 @@ -155,11 +155,11 @@ Rule Name | Description | Since `react-iframe-missing-sandbox` | React iframes must specify a sandbox attribute. If specified as an empty string, this attribute enables extra restrictions on the content that can appear in the inline frame. The value of the attribute can either be an empty string (all the restrictions are applied), or a space-separated list of tokens that lift particular restrictions. You many not use both allow-scripts and allow-same-origin at the same time, as that allows the embedded document to programmatically remove the sandbox attribute in some scenarios. | 2.0.10 `react-no-dangerous-html` | Do not use React's dangerouslySetInnerHTML API. This rule finds usages of the dangerouslySetInnerHTML API (but not any JSX references). For more info see the [react-no-dangerous-html Rule wiki page](https://github.com/Microsoft/tslint-microsoft-contrib/wiki/react-no-dangerous-html-Rule). | 0.0.2 `react-this-binding-issue` | Several errors can occur when using React and React.Component subclasses. When using React components you must be careful to correctly bind the 'this' reference on any methods that you pass off to child components as callbacks. For example, it is common to define a private method called 'onClick' and then specify `onClick={this.onClick}` as a JSX attribute. If you do this then the 'this' reference will be undefined when your private method is invoked. The React documentation suggests that you bind the 'this' reference on all of your methods within the constructor: `this.onClick = this.onClick.bind(this);`. This rule will create a violation if 1) a method reference is passed to a JSX attribute without being bound in the constructor. And 2) a method is bound multiple times in the constructor. Another issue that can occur is binding the 'this' reference to a function within the render() method. For example, many people will create an anonymous lambda within the JSX attribute to avoid the 'this' binding issue: `onClick={() => { this.onClick(); }}`. The problem with this is that a new instance of an anonymous function is created every time render() is invoked. When React compares virutal DOM properties within shouldComponentUpdate() then the onClick property will look like a new property and force a re-render. You should avoid this pattern because creating function instances within render methods breaks any logic within shouldComponentUpdate() methods. This rule creates violations if 1) an anonymous function is passed as a JSX attribute. And 2) if a function instantiated in local scope is passed as a JSX attribute. This rule can be configured via the "allow-anonymous-listeners" parameter. If you want to suppress violations for the anonymous listener scenarios then configure that rule like this: `"react-this-binding-issue": [ true, { 'allow-anonymous-listeners': true } ]` | 2.0.8, 2.0.9 -`react-tsx-curly-spacing` | Consistently use spaces around the brace characters of JSX attributes.You can either allow or bad spaces between the braces and the values they enclose.

One of the two following options are required:
* "always" enforces a space inside of curly braces (default)
* "never" disallows spaces inside of curly braces

By default, braces spanning multiple lines are not allowed with either setting. If you want to allow them you can specify an additional allowMultiline property with the value false.

Examples:
* "react-tsx-curly-spacing": [true, "always"]
* "react-tsx-curly-spacing": [true, "never"]
* "react-tsx-curly-spacing": [true, "never", {"allowMultiline": false}]

References
* [eslint-plugin-react jsx-curly-spacing rule](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-spacing.md) | 2.0.14 +`react-tsx-curly-spacing` | Deprecated - This rule can be replaced with tslint-react's jsx-curly-spacing. Consistently use spaces around the brace characters of JSX attributes.You can either allow or bad spaces between the braces and the values they enclose.

One of the two following options are required:
* "always" enforces a space inside of curly braces (default)
* "never" disallows spaces inside of curly braces

By default, braces spanning multiple lines are not allowed with either setting. If you want to allow them you can specify an additional allowMultiline property with the value false.

Examples:
* "react-tsx-curly-spacing": [true, "always"]
* "react-tsx-curly-spacing": [true, "never"]
* "react-tsx-curly-spacing": [true, "never", {"allowMultiline": false}]

References
* [eslint-plugin-react jsx-curly-spacing rule](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-spacing.md) | 2.0.14 `react-unused-props-and-state` | Remove unneeded properties defined in React Props and State interfaces. Any interface named Props or State is defined as a React interface. All fields in these interfaces must be referenced. This rule can be configured with regexes to match custom Props and State interface names.

Example for including all interfaces ending with Props or State:
*[ true, { 'props-interface-regex': 'Props$', 'state-interface-regex': 'State$' } ]* | 2.0.10 `underscore-consistent-invocation` | Enforce a consistent usage of the _ functions. By default, invoking underscore functions should begin with wrapping a variable in an underscore instance: `_(list).map(...)`. An alternative is to prefer using the static methods on the _ variable: `_.map(list, ...)`. The rule accepts single parameter called 'style' which can be the value 'static' or 'instance': `[true, { "style": "static" }]`| 2.0.10 `use-named-parameter` | Do not reference the arguments object by numerical index; instead, use a named parameter. This rule is similar to JSLint's [Use a named parameter](https://jslinterrors.com/use-a-named-parameter) rule. | 0.0.3 -`valid-typeof` | Ensures that the results of typeof are compared against a valid string. This rule aims to prevent errors from likely typos by ensuring that when the result of a typeof operation is compared against a string, that the string is a valid value. Similar to the [valid-typeof ESLint rule](http://eslint.org/docs/rules/valid-typeof).| 1.0 +`valid-typeof` | Deprecated - This rule is now enforced by the TypeScript compiler. Ensures that the results of typeof are compared against a valid string. This rule aims to prevent errors from likely typos by ensuring that when the result of a typeof operation is compared against a string, that the string is a valid value. Similar to the [valid-typeof ESLint rule](http://eslint.org/docs/rules/valid-typeof).| 1.0 Supported Formatters ----- diff --git a/src/functionNameRule.ts b/src/functionNameRule.ts index c8754f70c..5ae2b085b 100644 --- a/src/functionNameRule.ts +++ b/src/functionNameRule.ts @@ -31,7 +31,13 @@ export class Rule extends Lint.Rules.AbstractRule { commonWeaknessEnumeration: '398, 710' }; + private static isWarningShown: boolean = false; + public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] { + if (Rule.isWarningShown === false) { + console.warn('Warning: function-name rule is deprecated. Replace your usage with the TSLint variable-name rule.'); + Rule.isWarningShown = true; + } return this.applyWithWalker(new FunctionNameRuleWalker(sourceFile, this.getOptions())); } } diff --git a/src/missingJsdocRule.ts b/src/missingJsdocRule.ts index 1d61cec71..3899373ab 100644 --- a/src/missingJsdocRule.ts +++ b/src/missingJsdocRule.ts @@ -26,7 +26,13 @@ export class Rule extends Lint.Rules.AbstractRule { public static FAILURE_STRING: string = 'File missing JSDoc comment at the top-level: '; + private static isWarningShown: boolean = false; + public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] { + if (Rule.isWarningShown === false) { + console.warn('Warning: missing-jsdoc rule is deprecated. Replace your usage with the TSLint file-header rule.'); + Rule.isWarningShown = true; + } return this.applyWithWalker(new MissingJSDocWalker(sourceFile, this.getOptions())); } } diff --git a/src/noDuplicateCaseRule.ts b/src/noDuplicateCaseRule.ts index e1f3e27da..066192fe1 100644 --- a/src/noDuplicateCaseRule.ts +++ b/src/noDuplicateCaseRule.ts @@ -26,7 +26,14 @@ export class Rule extends Lint.Rules.AbstractRule { public static FAILURE_STRING: string = 'Duplicate case found in switch statement: '; + private static isWarningShown: boolean = false; + public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] { + if (Rule.isWarningShown === false) { + console.warn('Warning: no-duplicate-case rule is deprecated. ' + + 'Replace your usage with the TSLint no-duplicate-switch-case rule.'); + Rule.isWarningShown = true; + } return this.applyWithWalker(new NoDuplicateCaseRuleWalker(sourceFile, this.getOptions())); } diff --git a/src/noEmptyInterfacesRule.ts b/src/noEmptyInterfacesRule.ts index 69074f79e..27e07e2f6 100644 --- a/src/noEmptyInterfacesRule.ts +++ b/src/noEmptyInterfacesRule.ts @@ -27,7 +27,13 @@ export class Rule extends Lint.Rules.AbstractRule { public static FAILURE_STRING: string = 'Do not declare empty interfaces: '; + private static isWarningShown: boolean = false; + public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] { + if (Rule.isWarningShown === false) { + console.warn('Warning: no-empty-interfaces rule is deprecated. Replace your usage with the TSLint no-empty-interface rule.'); + Rule.isWarningShown = true; + } return this.applyWithWalker(new NoEmptyInterfacesRuleWalker(sourceFile, this.getOptions())); } diff --git a/src/noReservedKeywordsRule.ts b/src/noReservedKeywordsRule.ts index daee040b7..8531253bf 100644 --- a/src/noReservedKeywordsRule.ts +++ b/src/noReservedKeywordsRule.ts @@ -50,7 +50,13 @@ export class Rule extends Lint.Rules.AbstractRule { 'from', 'of' ]; + private static isWarningShown: boolean = false; + public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] { + if (Rule.isWarningShown === false) { + console.warn('Warning: no-reserved-keywords rule is deprecated. Replace your usage with the TSLint variable-name rule.'); + Rule.isWarningShown = true; + } const walker: Lint.RuleWalker = new BannedTermWalker( sourceFile, this.getOptions(), diff --git a/src/noUnnecessaryFieldInitializationRule.ts b/src/noUnnecessaryFieldInitializationRule.ts index 1e615af33..345650c0e 100644 --- a/src/noUnnecessaryFieldInitializationRule.ts +++ b/src/noUnnecessaryFieldInitializationRule.ts @@ -28,7 +28,14 @@ export class Rule extends Lint.Rules.AbstractRule { commonWeaknessEnumeration: '398, 710' }; + private static isWarningShown: boolean = false; + public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] { + if (Rule.isWarningShown === false) { + console.warn('Warning: no-unnecessary-field-initialization rule is deprecated. ' + + 'Replace your usage with the TSLint no-unnecessary-initializer rule.'); + Rule.isWarningShown = true; + } return this.applyWithWalker(new UnnecessaryFieldInitializationRuleWalker(sourceFile, this.getOptions())); } } diff --git a/src/preferArrayLiteralRule.ts b/src/preferArrayLiteralRule.ts index 4e444891c..9c9d61aab 100644 --- a/src/preferArrayLiteralRule.ts +++ b/src/preferArrayLiteralRule.ts @@ -28,7 +28,13 @@ export class Rule extends Lint.Rules.AbstractRule { public static GENERICS_FAILURE_STRING: string = 'Replace generic-typed Array with array literal: '; public static CONSTRUCTOR_FAILURE_STRING: string = 'Replace Array constructor with an array literal: '; + private static isWarningShown: boolean = false; + public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] { + if (Rule.isWarningShown === false) { + console.warn('Warning: prefer-array-literal rule is deprecated. Replace your usage with the TSLint array-type rule.'); + Rule.isWarningShown = true; + } return this.applyWithWalker(new NoGenericArrayWalker(sourceFile, this.getOptions())); } } diff --git a/src/preferTypeCastRule.ts b/src/preferTypeCastRule.ts index 381ad6d56..8676f7fbc 100644 --- a/src/preferTypeCastRule.ts +++ b/src/preferTypeCastRule.ts @@ -27,7 +27,14 @@ export class Rule extends Lint.Rules.AbstractRule { commonWeaknessEnumeration: '398, 710' }; + private static isWarningShown: boolean = false; + public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] { + if (Rule.isWarningShown === false) { + console.warn('Warning: prefer-type-cast rule is deprecated. ' + + 'Replace your usage with the TSLint no-angle-bracket-type-assertion rule.'); + Rule.isWarningShown = true; + } return this.applyWithWalker(new PreferTypeCastRuleWalker(sourceFile, this.getOptions())); } } diff --git a/src/promiseMustCompleteRule.ts b/src/promiseMustCompleteRule.ts index 02e43838d..952cdd6d3 100644 --- a/src/promiseMustCompleteRule.ts +++ b/src/promiseMustCompleteRule.ts @@ -28,7 +28,14 @@ export class Rule extends Lint.Rules.AbstractRule { public static FAILURE_STRING: string = 'A Promise was found that appears to not have resolve or reject invoked on all code paths'; + private static isWarningShown: boolean = false; + public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] { + if (Rule.isWarningShown === false) { + console.warn('Warning: promise-must-complete rule is deprecated. ' + + 'Replace your usage with the TSLint no-floating-promises rule.'); + Rule.isWarningShown = true; + } return this.applyWithWalker(new PromiseAnalyzer(sourceFile, this.getOptions())); } } diff --git a/src/reactTsxCurlySpacingRule.ts b/src/reactTsxCurlySpacingRule.ts index b8d169b9f..1aa53f11c 100644 --- a/src/reactTsxCurlySpacingRule.ts +++ b/src/reactTsxCurlySpacingRule.ts @@ -23,7 +23,14 @@ export class Rule extends Lint.Rules.AbstractRule { group: 'Whitespace' }; + private static isWarningShown: boolean = false; + public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] { + if (Rule.isWarningShown === false) { + console.warn('Warning: react-tsx-curly-spacing rule is deprecated. ' + + 'Replace your usage with the tslint-react jsx-curly-spacing rule.'); + Rule.isWarningShown = true; + } return this.applyWithWalker(new TsxCurlySpacingWalker(sourceFile, this.getOptions())); } } diff --git a/src/validTypeofRule.ts b/src/validTypeofRule.ts index 7c3a56c4d..dfb899b6c 100644 --- a/src/validTypeofRule.ts +++ b/src/validTypeofRule.ts @@ -27,7 +27,13 @@ export class Rule extends Lint.Rules.AbstractRule { public static VALID_TERMS: string[] = [ 'undefined', 'object', 'boolean', 'number', 'string', 'function', 'symbol' ]; + private static isWarningShown: boolean = false; + public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] { + if (Rule.isWarningShown === false) { + console.warn('Warning: valid-typeof rule is deprecated. Replace your usage with the TSLint typeof-compare rule.'); + Rule.isWarningShown = true; + } return this.applyWithWalker(new ValidTypeofRuleWalker(sourceFile, this.getOptions())); } From b8aef28e510acec618b6012248d71b3a801765b0 Mon Sep 17 00:00:00 2001 From: harold cooper Date: Thu, 14 Dec 2017 14:14:41 -0500 Subject: [PATCH 07/19] #406 fix typo in README.md closes #406 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 57363d0c7..1a310064b 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ The tslint.json file does not change format when using this package. Just add ou ##### Which Rules Should I Turn On? There certainly are a lot of options! Here are some links to get you started. -* Easiest Option - Our recommended ruleset is here: [recommended_ruleset.js](recommended_ruleset.js). You can also easily extend the ruleset by adding `"extends": "tslint-microsoft-contrib"` to your configuration. Please note, the default rules require the `--type-check` and `--project` TSLint options. Also, please note that adding a rule to the recommended ruleset is considered backwards compatible. If you reply on version ranges in your dependencies then you may find that new rules being added to the product create violations and fail your build. +* Easiest Option - Our recommended ruleset is here: [recommended_ruleset.js](recommended_ruleset.js). You can also easily extend the ruleset by adding `"extends": "tslint-microsoft-contrib"` to your configuration. Please note, the default rules require the `--type-check` and `--project` TSLint options. Also, please note that adding a rule to the recommended ruleset is considered backwards compatible. If you rely on version ranges in your dependencies then you may find that new rules being added to the product create violations and fail your build. * A nice blog post on the MSDN secure development blog can be found here: [Automating Secure Development Lifecycle Checks in TypeScript with TSLint](https://blogs.msdn.microsoft.com/secdevblog/2016/05/11/automating-secure-development-lifecycle-checks-in-typescript-with-tslint/) * A wiki briefly describing the SDL and related rules is here: [TSLint and the Microsoft Security Development Lifecycle](https://github.com/Microsoft/tslint-microsoft-contrib/wiki/TSLint-and-the-Microsoft-Security-Development-Lifecycle) * And our configuration file with all options is available here: [tslint.json](tslint.json) From 8fa60e42d11185c776663d563a36fe03afc195be Mon Sep 17 00:00:00 2001 From: Hamlet D'Arcy Date: Mon, 18 Dec 2017 11:59:55 +0100 Subject: [PATCH 08/19] #000 Upgrade to typescript 2.6.2 --- package.json | 2 +- src/tests/NoOctalLiteralTests.ts | 184 +- .../ReactThisBindingIssue-anon-instance.tsx | 2 +- .../ReactThisBindingIssue-local-instance.tsx | 2 +- typings/underscore.d.ts | 10849 ++++++++-------- 5 files changed, 5611 insertions(+), 5428 deletions(-) diff --git a/package.json b/package.json index 4cabf6078..44903fa97 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "mocha": "2.2.5", "time-grunt": "1.2.1", "tslint": "5.1.0", - "typescript": "2.4.2", + "typescript": "2.6.2", "underscore": "1.8.3" }, "peerDependencies": { diff --git a/src/tests/NoOctalLiteralTests.ts b/src/tests/NoOctalLiteralTests.ts index 0ce9e5daa..b904ad46a 100644 --- a/src/tests/NoOctalLiteralTests.ts +++ b/src/tests/NoOctalLiteralTests.ts @@ -53,7 +53,7 @@ function demoScriptFail() { ]); }); - it('should produce violations ', () : void => { + it('should produce violations - batch1', () : void => { const inputFile : string = ` /** * The following code should have errors: @@ -68,133 +68,149 @@ function demoScriptFail1() { return "Sample text \\-0"; return "Sample text \\-035"; return "Sample text \\-235"; -} - -function demoScriptFail2() { - return 'Sample text \\351'; - return 'Sample text \\354 more text'; - return 'Sample text \\33'; - return 'Sample text \\6'; - return 'Sample text \\125'; - return 'Sample text \\0'; - return 'Sample text \\-0'; - return 'Sample text \\-035'; - return 'Sample text \\-235'; -} - -`; +}`; TestHelper.assertViolations(ruleName, inputFile, [ { "failure": "Octal literals should not be used: \\251", "name": "file.ts", "ruleName": "no-octal-literal", - "startPosition": { "line": 6, "character": 25} + "ruleSeverity": "ERROR", + "startPosition": { "character": 25, "line": 6 } }, { "failure": "Octal literals should not be used: \\254", "name": "file.ts", "ruleName": "no-octal-literal", - "startPosition": { "line": 7, "character": 25 } + "ruleSeverity": "ERROR", + "startPosition": { "character": 25, "line": 7 } }, { "failure": "Octal literals should not be used: \\23", "name": "file.ts", "ruleName": "no-octal-literal", - "startPosition": { "line": 8, "character": 25 } + "ruleSeverity": "ERROR", + "startPosition": { "character": 25, "line": 8 } }, { "failure": "Octal literals should not be used: \\7", "name": "file.ts", "ruleName": "no-octal-literal", - "startPosition": { "line": 9, "character": 25 } - }, - { - "failure": "Octal literals should not be used: \\025", - "name": "file.ts", - "ruleName": "no-octal-literal", - "startPosition": { "line": 10, "character": 25 } + "ruleSeverity": "ERROR", + "startPosition": { "character": 25, "line": 9 } }, { "failure": "Octal literals should not be used: \\0", "name": "file.ts", "ruleName": "no-octal-literal", - "startPosition": { "line": 11, "character": 25 } + "ruleSeverity": "ERROR", + "startPosition": { "character": 25, "line": 11 } }, { "failure": "Octal literals should not be used: \\-0", "name": "file.ts", "ruleName": "no-octal-literal", - "startPosition": { "line": 12, "character": 25 } + "ruleSeverity": "ERROR", + "startPosition": { "character": 25, "line": 12 } }, { "failure": "Octal literals should not be used: \\-035", "name": "file.ts", "ruleName": "no-octal-literal", - "startPosition": { "line": 13, "character": 25 } + "ruleSeverity": "ERROR", + "startPosition": { "character": 25, "line": 13 } }, { "failure": "Octal literals should not be used: \\-235", "name": "file.ts", "ruleName": "no-octal-literal", - "startPosition": { "line": 14, "character": 25 } - }, - { - "failure": "Octal literals should not be used: \\351", - "name": "file.ts", - "ruleName": "no-octal-literal", - "startPosition": { "line": 18, "character": 25 } - }, - { - "failure": "Octal literals should not be used: \\354", - "name": "file.ts", - "ruleName": "no-octal-literal", - "startPosition": { "line": 19, "character": 25 } - }, - { - "failure": "Octal literals should not be used: \\33", - "name": "file.ts", - "ruleName": "no-octal-literal", - "startPosition": { "line": 20, "character": 25 } - }, - { - "failure": "Octal literals should not be used: \\6", - "name": "file.ts", - "ruleName": "no-octal-literal", - "startPosition": { "line": 21, "character": 25 } - }, - { - "failure": "Octal literals should not be used: \\125", - "name": "file.ts", - "ruleName": "no-octal-literal", - "startPosition": { "line": 22, "character": 25 } - }, - { - "failure": "Octal literals should not be used: \\0", - "name": "file.ts", - "ruleName": "no-octal-literal", - "startPosition": { "line": 23, "character": 25 } - }, - { - "failure": "Octal literals should not be used: \\-0", - "name": "file.ts", - "ruleName": "no-octal-literal", - "startPosition": { "line": 24, "character": 25 } - }, - { - "failure": "Octal literals should not be used: \\-035", - "name": "file.ts", - "ruleName": "no-octal-literal", - "startPosition": { "line": 25, "character": 25 } - }, - { - "failure": "Octal literals should not be used: \\-235", - "name": "file.ts", - "ruleName": "no-octal-literal", - "startPosition": { "line": 26, "character": 25 } + "ruleSeverity": "ERROR", + "startPosition": { "character": 25, "line": 14 } } ]); }); + it('should produce violations - batch2', () : void => { + const inputFile : string = ` +/** + * The following code should have errors: + */ +function demoScriptFail2() { + return 'Sample text \\351'; + return 'Sample text \\354 more text'; + return 'Sample text \\33'; + return 'Sample text \\6'; + return 'Sample text \\125'; + return 'Sample text \\0'; + return 'Sample text \\-0'; + return 'Sample text \\-035'; + return 'Sample text \\-235'; +}`; + TestHelper.assertViolations(ruleName, inputFile, [ + { + "failure": "Octal literals should not be used: \\351", + "name": "file.ts", + "ruleName": "no-octal-literal", + "ruleSeverity": "ERROR", + "startPosition": { "character": 25, "line": 6 } + }, + { + "failure": "Octal literals should not be used: \\354", + "name": "file.ts", + "ruleName": "no-octal-literal", + "ruleSeverity": "ERROR", + "startPosition": { "character": 25, "line": 7 } + }, + { + "failure": "Octal literals should not be used: \\33", + "name": "file.ts", + "ruleName": "no-octal-literal", + "ruleSeverity": "ERROR", + "startPosition": { "character": 25, "line": 8 } + }, + { + "failure": "Octal literals should not be used: \\6", + "name": "file.ts", + "ruleName": "no-octal-literal", + "ruleSeverity": "ERROR", + "startPosition": { "character": 25, "line": 9 } + }, + { + "failure": "Octal literals should not be used: \\125", + "name": "file.ts", + "ruleName": "no-octal-literal", + "ruleSeverity": "ERROR", + "startPosition": { "character": 25, "line": 10 } + }, + { + "failure": "Octal literals should not be used: \\0", + "name": "file.ts", + "ruleName": "no-octal-literal", + "ruleSeverity": "ERROR", + "startPosition": { "character": 25, "line": 11 } + }, + { + "failure": "Octal literals should not be used: \\-0", + "name": "file.ts", + "ruleName": "no-octal-literal", + "ruleSeverity": "ERROR", + "startPosition": { "character": 25, "line": 12 } + }, + { + "failure": "Octal literals should not be used: \\-035", + "name": "file.ts", + "ruleName": "no-octal-literal", + "ruleSeverity": "ERROR", + "startPosition": { "character": 25, "line": 13 } + }, + { + "failure": "Octal literals should not be used: \\-235", + "name": "file.ts", + "ruleName": "no-octal-literal", + "ruleSeverity": "ERROR", + "startPosition": { "character": 25, "line": 14 } + } + ]); + }); }); /* tslint:enable:no-octal-literal */ diff --git a/test-data/ReactThisBinding/ReactThisBindingIssue-anon-instance.tsx b/test-data/ReactThisBinding/ReactThisBindingIssue-anon-instance.tsx index 6d398137e..4a2d5151a 100644 --- a/test-data/ReactThisBinding/ReactThisBindingIssue-anon-instance.tsx +++ b/test-data/ReactThisBinding/ReactThisBindingIssue-anon-instance.tsx @@ -1,5 +1,5 @@ import React = require('react'); - +import _ = require('underscore'); export class MyComponent extends React.Component<{}, {}> { private listener(): void { diff --git a/test-data/ReactThisBinding/ReactThisBindingIssue-local-instance.tsx b/test-data/ReactThisBinding/ReactThisBindingIssue-local-instance.tsx index 3042623c2..35531ecc1 100644 --- a/test-data/ReactThisBinding/ReactThisBindingIssue-local-instance.tsx +++ b/test-data/ReactThisBinding/ReactThisBindingIssue-local-instance.tsx @@ -1,5 +1,5 @@ import React = require('react'); - +import _ = require('underscore'); export class MyComponent extends React.Component<{}, {}> { private listenerMethod() {} diff --git a/typings/underscore.d.ts b/typings/underscore.d.ts index ce6642b5b..741893f4a 100644 --- a/typings/underscore.d.ts +++ b/typings/underscore.d.ts @@ -1,8 +1,18 @@ -// Type definitions for Underscore 1.7.0 +// Type definitions for Underscore 1.8 // Project: http://underscorejs.org/ -// Definitions by: Boris Yankov , Josh Baldwin , Christopher Currens +// Definitions by: Boris Yankov , Josh Baldwin , Christopher Currens , Cassey Lottman // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +declare var _: _.UnderscoreStatic; +export = _; +export as namespace _; + +// The DOM is not required to be present, but these definitions reference type Element for the +// isElement check. If the DOM is present, this declaration will merge. +declare global { + interface Element { } +} + declare module _ { /** * underscore.js _.throttle options. @@ -67,6 +77,10 @@ declare module _ { (element: T, key: string, list: Dictionary): TResult; } + type IterateePropertyShorthand = string | number; + + type IterateeMatcherShorthand = Dictionary; + interface MemoIterator { (prev: TResult, curr: T, index: number, list: List): TResult; } @@ -74,5861 +88,6014 @@ declare module _ { interface MemoObjectIterator { (prev: TResult, curr: T, key: string, list: Dictionary): TResult; } -} - -interface UnderscoreStatic { - /** - * Underscore OOP Wrapper, all Underscore functions that take an object - * as the first parameter can be invoked through this function. - * @param key First argument to Underscore object functions. - **/ - (value: _.Dictionary): Underscore; - (value: Array): Underscore; - (value: T): Underscore; - /* ************* - * Collections * - ************* */ + interface Cancelable { + cancel(): void; + } - /** - * Iterates over a list of elements, yielding each in turn to an iterator function. The iterator is - * bound to the context object, if one is passed. Each invocation of iterator is called with three - * arguments: (element, index, list). If list is a JavaScript object, iterator's arguments will be - * (value, key, object). Delegates to the native forEach function if it exists. - * @param list Iterates over this list of elements. - * @param iterator Iterator function for each element `list`. - * @param context 'this' object in `iterator`, optional. - **/ - each( - list: _.List, - iterator: _.ListIterator, - context?: any): _.List; + interface UnderscoreStatic { + /** + * Underscore OOP Wrapper, all Underscore functions that take an object + * as the first parameter can be invoked through this function. + * @param key First argument to Underscore object functions. + **/ + (value: _.Dictionary): Underscore; + (value: Array): Underscore; + (value: T): Underscore; - /** - * @see _.each - * @param object Iterates over properties of this object. - * @param iterator Iterator function for each property on `object`. - * @param context 'this' object in `iterator`, optional. - **/ - each( - object: _.Dictionary, - iterator: _.ObjectIterator, - context?: any): _.Dictionary; + /* ************* + * Collections * + ************* */ - /** - * @see _.each - **/ - forEach( - list: _.List, - iterator: _.ListIterator, - context?: any): _.List; + /** + * Iterates over a list of elements, yielding each in turn to an iterator function. The iterator is + * bound to the context object, if one is passed. Each invocation of iterator is called with three + * arguments: (element, index, list). If list is a JavaScript object, iterator's arguments will be + * (value, key, object). Delegates to the native forEach function if it exists. + * @param list Iterates over this list of elements. + * @param iterator Iterator function for each element `list`. + * @param context 'this' object in `iterator`, optional. + **/ + each( + list: _.List, + iterator: _.ListIterator, + context?: any): _.List; - /** - * @see _.each - **/ - forEach( - object: _.Dictionary, - iterator: _.ObjectIterator, - context?: any): _.Dictionary; + /** + * @see _.each + * @param object Iterates over properties of this object. + * @param iterator Iterator function for each property on `object`. + * @param context 'this' object in `iterator`, optional. + **/ + each( + object: _.Dictionary, + iterator: _.ObjectIterator, + context?: any): _.Dictionary; - /** - * Produces a new array of values by mapping each value in list through a transformation function - * (iterator). If the native map method exists, it will be used instead. If list is a JavaScript - * object, iterator's arguments will be (value, key, object). - * @param list Maps the elements of this array. - * @param iterator Map iterator function for each element in `list`. - * @param context `this` object in `iterator`, optional. - * @return The mapped array result. - **/ - map( - list: _.List, - iterator: _.ListIterator, - context?: any): TResult[]; + /** + * @see _.each + **/ + forEach( + list: _.List, + iterator: _.ListIterator, + context?: any): _.List; - /** - * @see _.map - * @param object Maps the properties of this object. - * @param iterator Map iterator function for each property on `object`. - * @param context `this` object in `iterator`, optional. - * @return The mapped object result. - **/ - map( - object: _.Dictionary, - iterator: _.ObjectIterator, - context?: any): TResult[]; + /** + * @see _.each + **/ + forEach( + object: _.Dictionary, + iterator: _.ObjectIterator, + context?: any): _.Dictionary; - /** - * @see _.map - **/ - collect( - list: _.List, - iterator: _.ListIterator, - context?: any): TResult[]; + /** + * Produces a new array of values by mapping each value in list through a transformation function + * (iterator). If the native map method exists, it will be used instead. If list is a JavaScript + * object, iterator's arguments will be (value, key, object). + * @param list Maps the elements of this array. + * @param iterator Map iterator function for each element in `list`. + * @param context `this` object in `iterator`, optional. + * @return The mapped array result. + **/ + map( + list: _.List, + iterator: _.ListIterator, + context?: any): TResult[]; - /** - * @see _.map - **/ - collect( - object: _.Dictionary, - iterator: _.ObjectIterator, - context?: any): TResult[]; + map( + list: _.List, + iterator: _.IterateePropertyShorthand, + context?: any): T[]; - /** - * Also known as inject and foldl, reduce boils down a list of values into a single value. - * Memo is the initial state of the reduction, and each successive step of it should be - * returned by iterator. The iterator is passed four arguments: the memo, then the value - * and index (or key) of the iteration, and finally a reference to the entire list. - * @param list Reduces the elements of this array. - * @param iterator Reduce iterator function for each element in `list`. - * @param memo Initial reduce state. - * @param context `this` object in `iterator`, optional. - * @return Reduced object result. - **/ - reduce( - list: _.Collection, - iterator: _.MemoIterator, - memo?: TResult, - context?: any): TResult; - - reduce( - list: _.Dictionary, - iterator: _.MemoObjectIterator, - memo?: TResult, - context?: any): TResult; + map( + list: _.List, + iterator: _.IterateeMatcherShorthand, + context?: any): boolean[]; - /** - * @see _.reduce - **/ - inject( - list: _.Collection, - iterator: _.MemoIterator, - memo?: TResult, - context?: any): TResult; + /** + * @see _.map + * @param object Maps the properties of this object. + * @param iterator Map iterator function for each property on `object`. + * @param context `this` object in `iterator`, optional. + * @return The mapped object result. + **/ + map( + object: _.Dictionary, + iterator: _.ObjectIterator, + context?: any): TResult[]; - /** - * @see _.reduce - **/ - foldl( - list: _.Collection, - iterator: _.MemoIterator, - memo?: TResult, - context?: any): TResult; + /** + * @see _.map + **/ + collect: typeof _.map; - /** - * The right-associative version of reduce. Delegates to the JavaScript 1.8 version of - * reduceRight, if it exists. `foldr` is not as useful in JavaScript as it would be in a - * language with lazy evaluation. - * @param list Reduces the elements of this array. - * @param iterator Reduce iterator function for each element in `list`. - * @param memo Initial reduce state. - * @param context `this` object in `iterator`, optional. - * @return Reduced object result. - **/ - reduceRight( - list: _.Collection, - iterator: _.MemoIterator, - memo?: TResult, - context?: any): TResult; + /** + * Also known as inject and foldl, reduce boils down a list of values into a single value. + * Memo is the initial state of the reduction, and each successive step of it should be + * returned by iterator. The iterator is passed four arguments: the memo, then the value + * and index (or key) of the iteration, and finally a reference to the entire list. + * @param list Reduces the elements of this array. + * @param iterator Reduce iterator function for each element in `list`. + * @param memo Initial reduce state. + * @param context `this` object in `iterator`, optional. + * @return Reduced object result. + **/ + reduce( + list: _.List, + iterator: _.MemoIterator, + memo?: TResult, + context?: any): TResult; + + reduce( + list: _.Dictionary, + iterator: _.MemoObjectIterator, + memo?: TResult, + context?: any): TResult; - /** - * @see _.reduceRight - **/ - foldr( - list: _.Collection, - iterator: _.MemoIterator, - memo?: TResult, - context?: any): TResult; + /** + * @see _.reduce + **/ + inject( + list: _.List, + iterator: _.MemoIterator, + memo?: TResult, + context?: any): TResult; + + inject( + list: _.Dictionary, + iterator: _.MemoObjectIterator, + memo?: TResult, + context?: any): TResult; - /** - * Looks through each value in the list, returning the first one that passes a truth - * test (iterator). The function returns as soon as it finds an acceptable element, - * and doesn't traverse the entire list. - * @param list Searches for a value in this list. - * @param iterator Search iterator function for each element in `list`. - * @param context `this` object in `iterator`, optional. - * @return The first acceptable found element in `list`, if nothing is found undefined/null is returned. - **/ - find( - list: _.List, - iterator: _.ListIterator, - context?: any): T; + /** + * @see _.reduce + **/ + foldl( + list: _.Collection, + iterator: _.MemoIterator, + memo?: TResult, + context?: any): TResult; - /** - * @see _.find - **/ - find( - object: _.Dictionary, - iterator: _.ObjectIterator, - context?: any): T; + /** + * The right-associative version of reduce. Delegates to the JavaScript 1.8 version of + * reduceRight, if it exists. `foldr` is not as useful in JavaScript as it would be in a + * language with lazy evaluation. + * @param list Reduces the elements of this array. + * @param iterator Reduce iterator function for each element in `list`. + * @param memo Initial reduce state. + * @param context `this` object in `iterator`, optional. + * @return Reduced object result. + **/ + reduceRight( + list: _.Collection, + iterator: _.MemoIterator, + memo?: TResult, + context?: any): TResult; - /** - * @see _.find - **/ - find( - object: _.List|_.Dictionary, - iterator: U): T; + /** + * @see _.reduceRight + **/ + foldr( + list: _.Collection, + iterator: _.MemoIterator, + memo?: TResult, + context?: any): TResult; - /** - * @see _.find - **/ - find( - object: _.List|_.Dictionary, - iterator: string): T; + /** + * Looks through each value in the list, returning the first one that passes a truth + * test (iterator). The function returns as soon as it finds an acceptable element, + * and doesn't traverse the entire list. + * @param list Searches for a value in this list. + * @param iterator Search iterator function for each element in `list`. + * @param context `this` object in `iterator`, optional. + * @return The first acceptable found element in `list`, if nothing is found undefined/null is returned. + **/ + find( + list: _.List, + iterator: _.ListIterator, + context?: any): T | undefined; - /** - * @see _.find - **/ - detect( - list: _.List, - iterator: _.ListIterator, - context?: any): T; + /** + * @see _.find + **/ + find( + object: _.Dictionary, + iterator: _.ObjectIterator, + context?: any): T | undefined; - /** - * @see _.find - **/ - detect( - object: _.Dictionary, - iterator: _.ObjectIterator, - context?: any): T; + /** + * @see _.find + **/ + find( + object: _.List | _.Dictionary, + iterator: U): T | undefined; - /** - * @see _.find - **/ - detect( - object: _.List|_.Dictionary, - iterator: U): T; + /** + * @see _.find + **/ + find( + object: _.List | _.Dictionary, + iterator: string): T | undefined; - /** - * @see _.find - **/ - detect( - object: _.List|_.Dictionary, - iterator: string): T; + /** + * @see _.find + **/ + detect( + list: _.List, + iterator: _.ListIterator, + context?: any): T | undefined; - /** - * Looks through each value in the list, returning an array of all the values that pass a truth - * test (iterator). Delegates to the native filter method, if it exists. - * @param list Filter elements out of this list. - * @param iterator Filter iterator function for each element in `list`. - * @param context `this` object in `iterator`, optional. - * @return The filtered list of elements. - **/ - filter( - list: _.List, - iterator: _.ListIterator, - context?: any): T[]; + /** + * @see _.find + **/ + detect( + object: _.Dictionary, + iterator: _.ObjectIterator, + context?: any): T | undefined; - /** - * @see _.filter - **/ - filter( - object: _.Dictionary, - iterator: _.ObjectIterator, - context?: any): T[]; + /** + * @see _.find + **/ + detect( + object: _.List | _.Dictionary, + iterator: U): T | undefined; - /** - * @see _.filter - **/ - select( - list: _.List, - iterator: _.ListIterator, - context?: any): T[]; + /** + * @see _.find + **/ + detect( + object: _.List | _.Dictionary, + iterator: string): T | undefined; - /** - * @see _.filter - **/ - select( - object: _.Dictionary, - iterator: _.ObjectIterator, - context?: any): T[]; + /** + * Looks through each value in the list, returning an array of all the values that pass a truth + * test (iterator). Delegates to the native filter method, if it exists. + * @param list Filter elements out of this list. + * @param iterator Filter iterator function for each element in `list`. + * @param context `this` object in `iterator`, optional. + * @return The filtered list of elements. + **/ + filter( + list: _.List, + iterator: _.ListIterator, + context?: any): T[]; - /** - * Looks through each value in the list, returning an array of all the values that contain all - * of the key-value pairs listed in properties. - * @param list List to match elements again `properties`. - * @param properties The properties to check for on each element within `list`. - * @return The elements within `list` that contain the required `properties`. - **/ - where( - list: _.List, - properties: U): T[]; + /** + * @see _.filter + **/ + filter( + object: _.Dictionary, + iterator: _.ObjectIterator, + context?: any): T[]; - /** - * Looks through the list and returns the first value that matches all of the key-value pairs listed in properties. - * @param list Search through this list's elements for the first object with all `properties`. - * @param properties Properties to look for on the elements within `list`. - * @return The first element in `list` that has all `properties`. - **/ - findWhere( - list: _.List, - properties: U): T; + /** + * @see _.filter + **/ + select( + list: _.List, + iterator: _.ListIterator, + context?: any): T[]; - /** - * Returns the values in list without the elements that the truth test (iterator) passes. - * The opposite of filter. - * Return all the elements for which a truth test fails. - * @param list Reject elements within this list. - * @param iterator Reject iterator function for each element in `list`. - * @param context `this` object in `iterator`, optional. - * @return The rejected list of elements. - **/ - reject( - list: _.List, - iterator: _.ListIterator, - context?: any): T[]; + /** + * @see _.filter + **/ + select( + object: _.Dictionary, + iterator: _.ObjectIterator, + context?: any): T[]; - /** - * @see _.reject - **/ - reject( - object: _.Dictionary, - iterator: _.ObjectIterator, - context?: any): T[]; + /** + * Looks through each value in the list, returning an array of all the values that contain all + * of the key-value pairs listed in properties. + * @param list List to match elements again `properties`. + * @param properties The properties to check for on each element within `list`. + * @return The elements within `list` that contain the required `properties`. + **/ + where( + list: _.List, + properties: U): T[]; - /** - * Returns true if all of the values in the list pass the iterator truth test. Delegates to the - * native method every, if present. - * @param list Truth test against all elements within this list. - * @param iterator Trust test iterator function for each element in `list`. - * @param context `this` object in `iterator`, optional. - * @return True if all elements passed the truth test, otherwise false. - **/ - every( - list: _.List, - iterator?: _.ListIterator, - context?: any): boolean; + /** + * Looks through the list and returns the first value that matches all of the key-value pairs listed in properties. + * @param list Search through this list's elements for the first object with all `properties`. + * @param properties Properties to look for on the elements within `list`. + * @return The first element in `list` that has all `properties`. + **/ + findWhere( + list: _.List, + properties: U): T | undefined; - /** - * @see _.every - **/ - every( - list: _.Dictionary, - iterator?: _.ObjectIterator, - context?: any): boolean; + /** + * Returns the values in list without the elements that the truth test (iterator) passes. + * The opposite of filter. + * Return all the elements for which a truth test fails. + * @param list Reject elements within this list. + * @param iterator Reject iterator function for each element in `list`. + * @param context `this` object in `iterator`, optional. + * @return The rejected list of elements. + **/ + reject( + list: _.List, + iterator: _.ListIterator, + context?: any): T[]; - /** - * @see _.every - **/ - all( - list: _.List, - iterator?: _.ListIterator, - context?: any): boolean; + /** + * @see _.reject + **/ + reject( + object: _.Dictionary, + iterator: _.ObjectIterator, + context?: any): T[]; - /** - * @see _.every - **/ - all( - list: _.Dictionary, - iterator?: _.ObjectIterator, - context?: any): boolean; + /** + * Returns true if all of the values in the list pass the iterator truth test. Delegates to the + * native method every, if present. + * @param list Truth test against all elements within this list. + * @param iterator Trust test iterator function for each element in `list`. + * @param context `this` object in `iterator`, optional. + * @return True if all elements passed the truth test, otherwise false. + **/ + every( + list: _.List, + iterator?: _.ListIterator, + context?: any): boolean; - /** - * Returns true if any of the values in the list pass the iterator truth test. Short-circuits and - * stops traversing the list if a true element is found. Delegates to the native method some, if present. - * @param list Truth test against all elements within this list. - * @param iterator Trust test iterator function for each element in `list`. - * @param context `this` object in `iterator`, optional. - * @return True if any elements passed the truth test, otherwise false. - **/ - some( - list: _.List, - iterator?: _.ListIterator, - context?: any): boolean; + /** + * @see _.every + **/ + every( + list: _.Dictionary, + iterator?: _.ObjectIterator, + context?: any): boolean; - /** - * @see _.some - **/ - some( - object: _.Dictionary, - iterator?: _.ObjectIterator, - context?: any): boolean; + /** + * @see _.every + **/ + all( + list: _.List, + iterator?: _.ListIterator, + context?: any): boolean; - /** - * @see _.some - **/ - any( - list: _.List, - iterator?: _.ListIterator, - context?: any): boolean; + /** + * @see _.every + **/ + all( + list: _.Dictionary, + iterator?: _.ObjectIterator, + context?: any): boolean; - /** - * @see _.some - **/ - any( - object: _.Dictionary, - iterator?: _.ObjectIterator, - context?: any): boolean; + /** + * Returns true if any of the values in the list pass the iterator truth test. Short-circuits and + * stops traversing the list if a true element is found. Delegates to the native method some, if present. + * @param list Truth test against all elements within this list. + * @param iterator Trust test iterator function for each element in `list`. + * @param context `this` object in `iterator`, optional. + * @return True if any elements passed the truth test, otherwise false. + **/ + some( + list: _.List, + iterator?: _.ListIterator, + context?: any): boolean; - any( - list: _.List, - value: T): boolean; + /** + * @see _.some + **/ + some( + object: _.Dictionary, + iterator?: _.ObjectIterator, + context?: any): boolean; - /** - * Returns true if the value is present in the list. Uses indexOf internally, - * if list is an Array. - * @param list Checks each element to see if `value` is present. - * @param value The value to check for within `list`. - * @return True if `value` is present in `list`, otherwise false. - **/ - contains( - list: _.List, - value: T): boolean; + /** + * @see _.some + **/ + any( + list: _.List, + iterator?: _.ListIterator, + context?: any): boolean; - /** - * @see _.contains - **/ - contains( - object: _.Dictionary, - value: T): boolean; + /** + * @see _.some + **/ + any( + object: _.Dictionary, + iterator?: _.ObjectIterator, + context?: any): boolean; - /** - * @see _.contains - **/ - include( - list: _.Collection, - value: T): boolean; + any( + list: _.List, + value: T): boolean; - /** - * @see _.contains - **/ - include( - object: _.Dictionary, - value: T): boolean; + /** + * Returns true if the value is present in the list. Uses indexOf internally, + * if list is an Array. + * @param list Checks each element to see if `value` is present. + * @param value The value to check for within `list`. + * @return True if `value` is present in `list`, otherwise false. + **/ + contains( + list: _.List, + value: T, + fromIndex?: number): boolean; - /** - * Calls the method named by methodName on each value in the list. Any extra arguments passed to - * invoke will be forwarded on to the method invocation. - * @param list The element's in this list will each have the method `methodName` invoked. - * @param methodName The method's name to call on each element within `list`. - * @param arguments Additional arguments to pass to the method `methodName`. - **/ - invoke( - list: _.List, - methodName: string, - ...arguments: any[]): any; + /** + * @see _.contains + **/ + contains( + object: _.Dictionary, + value: T): boolean; - /** - * A convenient version of what is perhaps the most common use-case for map: extracting a list of - * property values. - * @param list The list to pluck elements out of that have the property `propertyName`. - * @param propertyName The property to look for on each element within `list`. - * @return The list of elements within `list` that have the property `propertyName`. - **/ - pluck( - list: _.List, - propertyName: string): any[]; + /** + * @see _.contains + **/ + include( + list: _.Collection, + value: T, + fromIndex?: number): boolean; - /** - * Returns the maximum value in list. - * @param list Finds the maximum value in this list. - * @return Maximum value in `list`. - **/ - max(list: _.List): number; + /** + * @see _.contains + **/ + include( + object: _.Dictionary, + value: T): boolean; - /** - * @see _.max - */ - max(object: _.Dictionary): number; + /** + * @see _.contains + **/ + includes( + list: _.Collection, + value: T, + fromIndex?: number): boolean; - /** - * Returns the maximum value in list. If iterator is passed, it will be used on each value to generate - * the criterion by which the value is ranked. - * @param list Finds the maximum value in this list. - * @param iterator Compares each element in `list` to find the maximum value. - * @param context `this` object in `iterator`, optional. - * @return The maximum element within `list`. - **/ - max( - list: _.List, - iterator?: _.ListIterator, - context?: any): T; + /** + * @see _.contains + **/ + includes( + object: _.Dictionary, + value: T): boolean; - /** - * @see _.max - */ - max( - list: _.Dictionary, - iterator?: _.ObjectIterator, - context?: any): T; + /** + * Calls the method named by methodName on each value in the list. Any extra arguments passed to + * invoke will be forwarded on to the method invocation. + * @param list The element's in this list will each have the method `methodName` invoked. + * @param methodName The method's name to call on each element within `list`. + * @param arguments Additional arguments to pass to the method `methodName`. + **/ + invoke( + list: _.List, + methodName: string, + ...args: any[]): any; - /** - * Returns the minimum value in list. - * @param list Finds the minimum value in this list. - * @return Minimum value in `list`. - **/ - min(list: _.List): number; + /** + * A convenient version of what is perhaps the most common use-case for map: extracting a list of + * property values. + * @param list The list to pluck elements out of that have the property `propertyName`. + * @param propertyName The property to look for on each element within `list`. + * @return The list of elements within `list` that have the property `propertyName`. + **/ + pluck( + list: _.List, + propertyName: string): any[]; - /** - * @see _.min - */ - min(o: _.Dictionary): number; + /** + * Returns the maximum value in list. + * @param list Finds the maximum value in this list. + * @return Maximum value in `list`. + **/ + max(list: _.List): number; - /** - * Returns the minimum value in list. If iterator is passed, it will be used on each value to generate - * the criterion by which the value is ranked. - * @param list Finds the minimum value in this list. - * @param iterator Compares each element in `list` to find the minimum value. - * @param context `this` object in `iterator`, optional. - * @return The minimum element within `list`. - **/ - min( - list: _.List, - iterator?: _.ListIterator, - context?: any): T; + /** + * @see _.max + */ + max(object: _.Dictionary): number; - /** - * @see _.min - */ - min( - list: _.Dictionary, - iterator?: _.ObjectIterator, - context?: any): T; + /** + * Returns the maximum value in list. If iterator is passed, it will be used on each value to generate + * the criterion by which the value is ranked. + * @param list Finds the maximum value in this list. + * @param iterator Compares each element in `list` to find the maximum value. + * @param context `this` object in `iterator`, optional. + * @return The maximum element within `list`. + **/ + max( + list: _.List, + iterator?: _.ListIterator, + context?: any): T; - /** - * Returns a sorted copy of list, ranked in ascending order by the results of running each value - * through iterator. Iterator may also be the string name of the property to sort by (eg. length). - * @param list Sorts this list. - * @param iterator Sort iterator for each element within `list`. - * @param context `this` object in `iterator`, optional. - * @return A sorted copy of `list`. - **/ - sortBy( - list: _.List, - iterator?: _.ListIterator, - context?: any): T[]; + /** + * @see _.max + */ + max( + list: _.Dictionary, + iterator?: _.ObjectIterator, + context?: any): T; - /** - * @see _.sortBy - * @param iterator Sort iterator for each element within `list`. - **/ - sortBy( - list: _.List, - iterator: string, - context?: any): T[]; + /** + * Returns the minimum value in list. + * @param list Finds the minimum value in this list. + * @return Minimum value in `list`. + **/ + min(list: _.List): number; - /** - * Splits a collection into sets, grouped by the result of running each value through iterator. - * If iterator is a string instead of a function, groups by the property named by iterator on - * each of the values. - * @param list Groups this list. - * @param iterator Group iterator for each element within `list`, return the key to group the element by. - * @param context `this` object in `iterator`, optional. - * @return An object with the group names as properties where each property contains the grouped elements from `list`. - **/ - groupBy( - list: _.List, - iterator?: _.ListIterator, - context?: any): _.Dictionary; + /** + * @see _.min + */ + min(o: _.Dictionary): number; - /** - * @see _.groupBy - * @param iterator Property on each object to group them by. - **/ - groupBy( - list: _.List, - iterator: string, - context?: any): _.Dictionary; + /** + * Returns the minimum value in list. If iterator is passed, it will be used on each value to generate + * the criterion by which the value is ranked. + * @param list Finds the minimum value in this list. + * @param iterator Compares each element in `list` to find the minimum value. + * @param context `this` object in `iterator`, optional. + * @return The minimum element within `list`. + **/ + min( + list: _.List, + iterator?: _.ListIterator, + context?: any): T; - /** - * Given a `list`, and an `iterator` function that returns a key for each element in the list (or a property name), - * returns an object with an index of each item. Just like _.groupBy, but for when you know your keys are unique. - **/ - indexBy( - list: _.List, - iterator: _.ListIterator, - context?: any): _.Dictionary; + /** + * @see _.min + */ + min( + list: _.Dictionary, + iterator?: _.ObjectIterator, + context?: any): T; - /** - * @see _.indexBy - * @param iterator Property on each object to index them by. - **/ - indexBy( - list: _.List, - iterator: string, - context?: any): _.Dictionary; + /** + * Returns a sorted copy of list, ranked in ascending order by the results of running each value + * through iterator. Iterator may also be the string name of the property to sort by (eg. length). + * @param list Sorts this list. + * @param iterator Sort iterator for each element within `list`. + * @param context `this` object in `iterator`, optional. + * @return A sorted copy of `list`. + **/ + sortBy( + list: _.List, + iterator?: _.ListIterator, + context?: any): T[]; - /** - * Sorts a list into groups and returns a count for the number of objects in each group. Similar - * to groupBy, but instead of returning a list of values, returns a count for the number of values - * in that group. - * @param list Group elements in this list and then count the number of elements in each group. - * @param iterator Group iterator for each element within `list`, return the key to group the element by. - * @param context `this` object in `iterator`, optional. - * @return An object with the group names as properties where each property contains the number of elements in that group. - **/ - countBy( - list: _.List, - iterator?: _.ListIterator, - context?: any): _.Dictionary; + /** + * @see _.sortBy + * @param iterator Sort iterator for each element within `list`. + **/ + sortBy( + list: _.List, + iterator: string, + context?: any): T[]; - /** - * @see _.countBy - * @param iterator Function name - **/ - countBy( - list: _.List, - iterator: string, - context?: any): _.Dictionary; + /** + * Splits a collection into sets, grouped by the result of running each value through iterator. + * If iterator is a string instead of a function, groups by the property named by iterator on + * each of the values. + * @param list Groups this list. + * @param iterator Group iterator for each element within `list`, return the key to group the element by. + * @param context `this` object in `iterator`, optional. + * @return An object with the group names as properties where each property contains the grouped elements from `list`. + **/ + groupBy( + list: _.List, + iterator?: _.ListIterator, + context?: any): _.Dictionary; - /** - * Returns a shuffled copy of the list, using a version of the Fisher-Yates shuffle. - * @param list List to shuffle. - * @return Shuffled copy of `list`. - **/ - shuffle(list: _.Collection): T[]; + /** + * @see _.groupBy + * @param iterator Property on each object to group them by. + **/ + groupBy( + list: _.List, + iterator: string, + context?: any): _.Dictionary; - /** - * Produce a random sample from the `list`. Pass a number to return `n` random elements from the list. Otherwise a single random item will be returned. - * @param list List to sample. - * @return Random sample of `n` elements in `list`. - **/ - sample(list: _.Collection, n: number): T[]; + /** + * Given a `list`, and an `iterator` function that returns a key for each element in the list (or a property name), + * returns an object with an index of each item. Just like _.groupBy, but for when you know your keys are unique. + **/ + indexBy( + list: _.List, + iterator: _.ListIterator, + context?: any): _.Dictionary; - /** - * @see _.sample - **/ - sample(list: _.Collection): T; + /** + * @see _.indexBy + * @param iterator Property on each object to index them by. + **/ + indexBy( + list: _.List, + iterator: string, + context?: any): _.Dictionary; - /** - * Converts the list (anything that can be iterated over), into a real Array. Useful for transmuting - * the arguments object. - * @param list object to transform into an array. - * @return `list` as an array. - **/ - toArray(list: _.Collection): T[]; + /** + * Sorts a list into groups and returns a count for the number of objects in each group. Similar + * to groupBy, but instead of returning a list of values, returns a count for the number of values + * in that group. + * @param list Group elements in this list and then count the number of elements in each group. + * @param iterator Group iterator for each element within `list`, return the key to group the element by. + * @param context `this` object in `iterator`, optional. + * @return An object with the group names as properties where each property contains the number of elements in that group. + **/ + countBy( + list: _.List, + iterator?: _.ListIterator, + context?: any): _.Dictionary; - /** - * Return the number of values in the list. - * @param list Count the number of values/elements in this list. - * @return Number of values in `list`. - **/ - size(list: _.Collection): number; + /** + * @see _.countBy + * @param iterator Function name + **/ + countBy( + list: _.List, + iterator: string, + context?: any): _.Dictionary; - /** - * Split array into two arrays: - * one whose elements all satisfy predicate and one whose elements all do not satisfy predicate. - * @param array Array to split in two. - * @param iterator Filter iterator function for each element in `array`. - * @param context `this` object in `iterator`, optional. - * @return Array where Array[0] are the elements in `array` that satisfies the predicate, and Array[1] the elements that did not. - **/ - partition( - array: Array, - iterator: _.ListIterator, - context?: any): T[][]; + /** + * Returns a shuffled copy of the list, using a version of the Fisher-Yates shuffle. + * @param list List to shuffle. + * @return Shuffled copy of `list`. + **/ + shuffle(list: _.Collection): T[]; - /********* - * Arrays * - **********/ + /** + * Produce a random sample from the `list`. Pass a number to return `n` random elements from the list. Otherwise a single random item will be returned. + * @param list List to sample. + * @return Random sample of `n` elements in `list`. + **/ + sample(list: _.Collection, n: number): T[]; - /** - * Returns the first element of an array. Passing n will return the first n elements of the array. - * @param array Retrieves the first element of this array. - * @return Returns the first element of `array`. - **/ - first(array: _.List): T; + /** + * @see _.sample + **/ + sample(list: _.Collection): T; - /** - * @see _.first - * @param n Return more than one element from `array`. - **/ - first( - array: _.List, - n: number): T[]; + /** + * Converts the list (anything that can be iterated over), into a real Array. Useful for transmuting + * the arguments object. + * @param list object to transform into an array. + * @return `list` as an array. + **/ + toArray(list: _.Collection): T[]; - /** - * @see _.first - **/ - head(array: _.List): T; + /** + * Return the number of values in the list. + * @param list Count the number of values/elements in this list. + * @return Number of values in `list`. + **/ + size(list: _.Collection): number; - /** - * @see _.first - **/ - head( - array: _.List, - n: number): T[]; + /** + * Split array into two arrays: + * one whose elements all satisfy predicate and one whose elements all do not satisfy predicate. + * @param array Array to split in two. + * @param iterator Filter iterator function for each element in `array`. + * @param context `this` object in `iterator`, optional. + * @return Array where Array[0] are the elements in `array` that satisfies the predicate, and Array[1] the elements that did not. + **/ + partition( + array: Array, + iterator: _.ListIterator, + context?: any): T[][]; - /** - * @see _.first - **/ - take(array: _.List): T; + /********* + * Arrays * + **********/ - /** - * @see _.first - **/ - take( - array: _.List, - n: number): T[]; + /** + * Returns the first element of an array. Passing n will return the first n elements of the array. + * @param array Retrieves the first element of this array. + * @return Returns the first element of `array`. + **/ + first(array: _.List): T | undefined; - /** - * Returns everything but the last entry of the array. Especially useful on the arguments object. - * Pass n to exclude the last n elements from the result. - * @param array Retrieve all elements except the last `n`. - * @param n Leaves this many elements behind, optional. - * @return Returns everything but the last `n` elements of `array`. - **/ - initial( - array: _.List, - n?: number): T[]; + /** + * @see _.first + * @param n Return more than one element from `array`. + **/ + first( + array: _.List, + n: number): T[]; - /** - * Returns the last element of an array. Passing n will return the last n elements of the array. - * @param array Retrieves the last element of this array. - * @return Returns the last element of `array`. - **/ - last(array: _.List): T; + /** + * @see _.first + **/ + head(array: _.List): T | undefined; - /** - * @see _.last - * @param n Return more than one element from `array`. - **/ - last( - array: _.List, - n: number): T[]; + /** + * @see _.first + **/ + head( + array: _.List, + n: number): T[]; - /** - * Returns the rest of the elements in an array. Pass an index to return the values of the array - * from that index onward. - * @param array The array to retrieve all but the first `index` elements. - * @param n The index to start retrieving elements forward from, optional, default = 1. - * @return Returns the elements of `array` from `index` to the end of `array`. - **/ - rest( - array: _.List, - n?: number): T[]; + /** + * @see _.first + **/ + take(array: _.List): T; - /** - * @see _.rest - **/ - tail( - array: _.List, - n?: number): T[]; + /** + * @see _.first + **/ + take( + array: _.List, + n: number): T[]; - /** - * @see _.rest - **/ - drop( - array: _.List, - n?: number): T[]; + /** + * Returns everything but the last entry of the array. Especially useful on the arguments object. + * Pass n to exclude the last n elements from the result. + * @param array Retrieve all elements except the last `n`. + * @param n Leaves this many elements behind, optional. + * @return Returns everything but the last `n` elements of `array`. + **/ + initial( + array: _.List, + n?: number): T[]; - /** - * Returns a copy of the array with all falsy values removed. In JavaScript, false, null, 0, "", - * undefined and NaN are all falsy. - * @param array Array to compact. - * @return Copy of `array` without false values. - **/ - compact(array: _.List): T[]; + /** + * Returns the last element of an array. Passing n will return the last n elements of the array. + * @param array Retrieves the last element of this array. + * @return Returns the last element of `array`. + **/ + last(array: _.List): T | undefined; - /** - * Flattens a nested array (the nesting can be to any depth). If you pass shallow, the array will - * only be flattened a single level. - * @param array The array to flatten. - * @param shallow If true then only flatten one level, optional, default = false. - * @return `array` flattened. - **/ - flatten( - array: _.List, - shallow?: boolean): any[]; + /** + * @see _.last + * @param n Return more than one element from `array`. + **/ + last( + array: _.List, + n: number): T[]; - /** - * Returns a copy of the array with all instances of the values removed. - * @param array The array to remove `values` from. - * @param values The values to remove from `array`. - * @return Copy of `array` without `values`. - **/ - without( - array: _.List, - ...values: T[]): T[]; + /** + * Returns the rest of the elements in an array. Pass an index to return the values of the array + * from that index onward. + * @param array The array to retrieve all but the first `index` elements. + * @param n The index to start retrieving elements forward from, optional, default = 1. + * @return Returns the elements of `array` from `index` to the end of `array`. + **/ + rest( + array: _.List, + n?: number): T[]; - /** - * Computes the union of the passed-in arrays: the list of unique items, in order, that are - * present in one or more of the arrays. - * @param arrays Array of arrays to compute the union of. - * @return The union of elements within `arrays`. - **/ - union(...arrays: _.List[]): T[]; + /** + * @see _.rest + **/ + tail( + array: _.List, + n?: number): T[]; - /** - * Computes the list of values that are the intersection of all the arrays. Each value in the result - * is present in each of the arrays. - * @param arrays Array of arrays to compute the intersection of. - * @return The intersection of elements within `arrays`. - **/ - intersection(...arrays: _.List[]): T[]; + /** + * @see _.rest + **/ + drop( + array: _.List, + n?: number): T[]; - /** - * Similar to without, but returns the values from array that are not present in the other arrays. - * @param array Keeps values that are within `others`. - * @param others The values to keep within `array`. - * @return Copy of `array` with only `others` values. - **/ - difference( - array: _.List, - ...others: _.List[]): T[]; + /** + * Returns a copy of the array with all falsy values removed. In JavaScript, false, null, 0, "", + * undefined and NaN are all falsy. + * @param array Array to compact. + * @return Copy of `array` without false values. + **/ + compact(array: _.List): T[]; - /** - * Produces a duplicate-free version of the array, using === to test object equality. If you know in - * advance that the array is sorted, passing true for isSorted will run a much faster algorithm. If - * you want to compute unique items based on a transformation, pass an iterator function. - * @param array Array to remove duplicates from. - * @param isSorted True if `array` is already sorted, optional, default = false. - * @param iterator Transform the elements of `array` before comparisons for uniqueness. - * @param context 'this' object in `iterator`, optional. - * @return Copy of `array` where all elements are unique. - **/ - uniq( - array: _.List, - isSorted?: boolean, - iterator?: _.ListIterator, - context?: any): T[]; + /** + * Flattens a nested array (the nesting can be to any depth). If you pass shallow, the array will + * only be flattened a single level. + * @param array The array to flatten. + * @param shallow If true then only flatten one level, optional, default = false. + * @return `array` flattened. + **/ + flatten( + array: _.List, + shallow?: boolean): any[]; - /** - * @see _.uniq - **/ - uniq( - array: _.List, - iterator?: _.ListIterator, - context?: any): T[]; + /** + * Returns a copy of the array with all instances of the values removed. + * @param array The array to remove `values` from. + * @param values The values to remove from `array`. + * @return Copy of `array` without `values`. + **/ + without( + array: _.List, + ...values: T[]): T[]; - /** - * @see _.uniq - **/ - unique( - array: _.List, - iterator?: _.ListIterator, - context?: any): T[]; + /** + * Computes the union of the passed-in arrays: the list of unique items, in order, that are + * present in one or more of the arrays. + * @param arrays Array of arrays to compute the union of. + * @return The union of elements within `arrays`. + **/ + union(...arrays: _.List[]): T[]; - /** - * @see _.uniq - **/ - unique( - array: _.List, - isSorted?: boolean, - iterator?: _.ListIterator, - context?: any): T[]; + /** + * Computes the list of values that are the intersection of all the arrays. Each value in the result + * is present in each of the arrays. + * @param arrays Array of arrays to compute the intersection of. + * @return The intersection of elements within `arrays`. + **/ + intersection(...arrays: _.List[]): T[]; + /** + * Similar to without, but returns the values from array that are not present in the other arrays. + * @param array Keeps values that are within `others`. + * @param others The values to keep within `array`. + * @return Copy of `array` with only `others` values. + **/ + difference( + array: _.List, + ...others: _.List[]): T[]; - /** - * Merges together the values of each of the arrays with the values at the corresponding position. - * Useful when you have separate data sources that are coordinated through matching array indexes. - * If you're working with a matrix of nested arrays, zip.apply can transpose the matrix in a similar fashion. - * @param arrays The arrays to merge/zip. - * @return Zipped version of `arrays`. - **/ - zip(...arrays: any[][]): any[][]; + /** + * Produces a duplicate-free version of the array, using === to test object equality. If you know in + * advance that the array is sorted, passing true for isSorted will run a much faster algorithm. If + * you want to compute unique items based on a transformation, pass an iterator function. + * @param array Array to remove duplicates from. + * @param isSorted True if `array` is already sorted, optional, default = false. + * @param iterator Transform the elements of `array` before comparisons for uniqueness. + * @param context 'this' object in `iterator`, optional. + * @return Copy of `array` where all elements are unique. + **/ + uniq( + array: _.List, + isSorted?: boolean, + iterator?: _.ListIterator | _.IterateePropertyShorthand, + context?: any): T[]; - /** - * @see _.zip - **/ - zip(...arrays: any[]): any[]; + /** + * @see _.uniq + **/ + uniq( + array: _.List, + iterator?: _.ListIterator | _.IterateePropertyShorthand, + context?: any): T[]; - /** - * The opposite of zip. Given a number of arrays, returns a series of new arrays, the first - * of which contains all of the first elements in the input arrays, the second of which - * contains all of the second elements, and so on. Use with apply to pass in an array - * of arrays - * @param arrays The arrays to unzip. - * @return Unzipped version of `arrays`. - **/ - unzip(...arrays: any[][]): any[][]; + /** + * @see _.uniq + **/ + unique( + array: _.List, + iterator?: _.ListIterator | _.IterateePropertyShorthand, + context?: any): T[]; - /** - * Converts arrays into objects. Pass either a single list of [key, value] pairs, or a - * list of keys, and a list of values. - * @param keys Key array. - * @param values Value array. - * @return An object containing the `keys` as properties and `values` as the property values. - **/ - object( - keys: _.List, - values: _.List): TResult; + /** + * @see _.uniq + **/ + unique( + array: _.List, + isSorted?: boolean, + iterator?: _.ListIterator | _.IterateePropertyShorthand, + context?: any): T[]; - /** - * Converts arrays into objects. Pass either a single list of [key, value] pairs, or a - * list of keys, and a list of values. - * @param keyValuePairs Array of [key, value] pairs. - * @return An object containing the `keys` as properties and `values` as the property values. - **/ - object(...keyValuePairs: any[][]): TResult; - /** - * @see _.object - **/ - object( - list: _.List, - values?: any): TResult; + /** + * Merges together the values of each of the arrays with the values at the corresponding position. + * Useful when you have separate data sources that are coordinated through matching array indexes. + * If you're working with a matrix of nested arrays, zip.apply can transpose the matrix in a similar fashion. + * @param arrays The arrays to merge/zip. + * @return Zipped version of `arrays`. + **/ + zip(...arrays: any[][]): any[][]; - /** - * Returns the index at which value can be found in the array, or -1 if value is not present in the array. - * Uses the native indexOf function unless it's missing. If you're working with a large array, and you know - * that the array is already sorted, pass true for isSorted to use a faster binary search ... or, pass a number - * as the third argument in order to look for the first matching value in the array after the given index. - * @param array The array to search for the index of `value`. - * @param value The value to search for within `array`. - * @param isSorted True if the array is already sorted, optional, default = false. - * @return The index of `value` within `array`. - **/ - indexOf( - array: _.List, - value: T, - isSorted?: boolean): number; + /** + * @see _.zip + **/ + zip(...arrays: any[]): any[]; - /** - * @see _indexof - **/ - indexOf( - array: _.List, - value: T, - startFrom: number): number; + /** + * The opposite of zip. Given a number of arrays, returns a series of new arrays, the first + * of which contains all of the first elements in the input arrays, the second of which + * contains all of the second elements, and so on. Use with apply to pass in an array + * of arrays + * @param arrays The arrays to unzip. + * @return Unzipped version of `arrays`. + **/ + unzip(...arrays: any[][]): any[][]; - /** - * Returns the index of the last occurrence of value in the array, or -1 if value is not present. Uses the - * native lastIndexOf function if possible. Pass fromIndex to start your search at a given index. - * @param array The array to search for the last index of `value`. - * @param value The value to search for within `array`. - * @param from The starting index for the search, optional. - * @return The index of the last occurrence of `value` within `array`. - **/ - lastIndexOf( - array: _.List, - value: T, - from?: number): number; + /** + * Converts arrays into objects. Pass either a single list of [key, value] pairs, or a + * list of keys, and a list of values. + * @param keys Key array. + * @param values Value array. + * @return An object containing the `keys` as properties and `values` as the property values. + **/ + object( + keys: _.List, + values: _.List): TResult; - /** - * Returns the first index of an element in `array` where the predicate truth test passes - * @param array The array to search for the index of the first element where the predicate truth test passes. - * @param predicate Predicate function. - * @param context `this` object in `predicate`, optional. - * @return Returns the index of an element in `array` where the predicate truth test passes or -1.` - **/ - findIndex( - array: _.List, - predicate: _.ListIterator | {}, - context?: any): number; + /** + * Converts arrays into objects. Pass either a single list of [key, value] pairs, or a + * list of keys, and a list of values. + * @param keyValuePairs Array of [key, value] pairs. + * @return An object containing the `keys` as properties and `values` as the property values. + **/ + object(...keyValuePairs: any[][]): TResult; - /** - * Returns the last index of an element in `array` where the predicate truth test passes - * @param array The array to search for the index of the last element where the predicate truth test passes. - * @param predicate Predicate function. - * @param context `this` object in `predicate`, optional. - * @return Returns the index of an element in `array` where the predicate truth test passes or -1.` - **/ - findLastIndex( - array: _.List, - predicate: _.ListIterator | {}, - context?: any): number; + /** + * @see _.object + **/ + object( + list: _.List, + values?: any): TResult; - /** - * Uses a binary search to determine the index at which the value should be inserted into the list in order - * to maintain the list's sorted order. If an iterator is passed, it will be used to compute the sort ranking - * of each value, including the value you pass. - * @param list The sorted list. - * @param value The value to determine its index within `list`. - * @param iterator Iterator to compute the sort ranking of each value, optional. - * @return The index where `value` should be inserted into `list`. - **/ - sortedIndex( - list: _.List, - value: T, - iterator?: (x: T) => TSort, context?: any): number; + /** + * Returns the index at which value can be found in the array, or -1 if value is not present in the array. + * Uses the native indexOf function unless it's missing. If you're working with a large array, and you know + * that the array is already sorted, pass true for isSorted to use a faster binary search ... or, pass a number + * as the third argument in order to look for the first matching value in the array after the given index. + * @param array The array to search for the index of `value`. + * @param value The value to search for within `array`. + * @param isSorted True if the array is already sorted, optional, default = false. + * @return The index of `value` within `array`. + **/ + indexOf( + array: _.List, + value: T, + isSorted?: boolean): number; - /** - * A function to create flexibly-numbered lists of integers, handy for each and map loops. start, if omitted, - * defaults to 0; step defaults to 1. Returns a list of integers from start to stop, incremented (or decremented) - * by step, exclusive. - * @param start Start here. - * @param stop Stop here. - * @param step The number to count up by each iteration, optional, default = 1. - * @return Array of numbers from `start` to `stop` with increments of `step`. - **/ + /** + * @see _indexof + **/ + indexOf( + array: _.List, + value: T, + startFrom: number): number; - range( - start: number, - stop: number, - step?: number): number[]; + /** + * Returns the index of the last occurrence of value in the array, or -1 if value is not present. Uses the + * native lastIndexOf function if possible. Pass fromIndex to start your search at a given index. + * @param array The array to search for the last index of `value`. + * @param value The value to search for within `array`. + * @param from The starting index for the search, optional. + * @return The index of the last occurrence of `value` within `array`. + **/ + lastIndexOf( + array: _.List, + value: T, + from?: number): number; - /** - * @see _.range - * @param stop Stop here. - * @return Array of numbers from 0 to `stop` with increments of 1. - * @note If start is not specified the implementation will never pull the step (step = arguments[2] || 0) - **/ - range(stop: number): number[]; + /** + * Returns the first index of an element in `array` where the predicate truth test passes + * @param array The array to search for the index of the first element where the predicate truth test passes. + * @param predicate Predicate function. + * @param context `this` object in `predicate`, optional. + * @return Returns the index of an element in `array` where the predicate truth test passes or -1.` + **/ + findIndex( + array: _.List, + predicate: _.ListIterator | {}, + context?: any): number; - /************* - * Functions * - *************/ + /** + * Returns the last index of an element in `array` where the predicate truth test passes + * @param array The array to search for the index of the last element where the predicate truth test passes. + * @param predicate Predicate function. + * @param context `this` object in `predicate`, optional. + * @return Returns the index of an element in `array` where the predicate truth test passes or -1.` + **/ + findLastIndex( + array: _.List, + predicate: _.ListIterator | {}, + context?: any): number; - /** - * Bind a function to an object, meaning that whenever the function is called, the value of this will - * be the object. Optionally, bind arguments to the function to pre-fill them, also known as partial application. - * @param func The function to bind `this` to `object`. - * @param context The `this` pointer whenever `fn` is called. - * @param arguments Additional arguments to pass to `fn` when called. - * @return `fn` with `this` bound to `object`. - **/ - bind( - func: Function, - context: any, - ...arguments: any[]): () => any; + /** + * Uses a binary search to determine the index at which the value should be inserted into the list in order + * to maintain the list's sorted order. If an iterator is passed, it will be used to compute the sort ranking + * of each value, including the value you pass. + * @param list The sorted list. + * @param value The value to determine its index within `list`. + * @param iterator Iterator to compute the sort ranking of each value, optional. + * @param context `this` object in `iterator`, optional. + * @return The index where `value` should be inserted into `list`. + **/ + sortedIndex( + list: _.List, + value: T, + iterator?: ((x: T) => TSort) | string, + context?: any + ): number; - /** - * Binds a number of methods on the object, specified by methodNames, to be run in the context of that object - * whenever they are invoked. Very handy for binding functions that are going to be used as event handlers, - * which would otherwise be invoked with a fairly useless this. If no methodNames are provided, all of the - * object's function properties will be bound to it. - * @param object The object to bind the methods `methodName` to. - * @param methodNames The methods to bind to `object`, optional and if not provided all of `object`'s - * methods are bound. - **/ - bindAll( - object: any, - ...methodNames: string[]): any; + /** + * A function to create flexibly-numbered lists of integers, handy for each and map loops. start, if omitted, + * defaults to 0; step defaults to 1. Returns a list of integers from start to stop, incremented (or decremented) + * by step, exclusive. + * @param start Start here. + * @param stop Stop here. + * @param step The number to count up by each iteration, optional, default = 1. + * @return Array of numbers from `start` to `stop` with increments of `step`. + **/ - /** - * Partially apply a function by filling in any number of its arguments, without changing its dynamic this value. - * A close cousin of bind. You may pass _ in your list of arguments to specify an argument that should not be - * pre-filled, but left open to supply at call-time. - * @param fn Function to partially fill in arguments. - * @param arguments The partial arguments. - * @return `fn` with partially filled in arguments. - **/ + range( + start: number, + stop: number, + step?: number): number[]; - partial( - fn: { (p1: T1):T2 }, - p1: T1 - ): { (): T2 }; - - partial( - fn: { (p1: T1, p2: T2):T3 }, - p1: T1 - ): { (p2: T2): T3 }; - - partial( - fn: { (p1: T1, p2: T2):T3 }, - p1: T1, - p2: T2 - ): { (): T3 }; - - partial( - fn: { (p1: T1, p2: T2):T3 }, - stub1: UnderscoreStatic, - p2: T2 - ): { (p1: T1): T3 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3):T4 }, - p1: T1 - ): { (p2: T2, p3: T3): T4 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3):T4 }, - p1: T1, - p2: T2 - ): { (p3: T3): T4 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3):T4 }, - stub1: UnderscoreStatic, - p2: T2 - ): { (p1: T1, p3: T3): T4 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3):T4 }, - p1: T1, - p2: T2, - p3: T3 - ): { (): T4 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3):T4 }, - stub1: UnderscoreStatic, - p2: T2, - p3: T3 - ): { (p1: T1): T4 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3):T4 }, - p1: T1, - stub2: UnderscoreStatic, - p3: T3 - ): { (p2: T2): T4 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3):T4 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - p3: T3 - ): { (p1: T1, p2: T2): T4 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 }, - p1: T1 - ): { (p2: T2, p3: T3, p4: T4): T5 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 }, - p1: T1, - p2: T2 - ): { (p3: T3, p4: T4): T5 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 }, - stub1: UnderscoreStatic, - p2: T2 - ): { (p1: T1, p3: T3, p4: T4): T5 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 }, - p1: T1, - p2: T2, - p3: T3 - ): { (p4: T4): T5 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 }, - stub1: UnderscoreStatic, - p2: T2, - p3: T3 - ): { (p1: T1, p4: T4): T5 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 }, - p1: T1, - stub2: UnderscoreStatic, - p3: T3 - ): { (p2: T2, p4: T4): T5 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - p3: T3 - ): { (p1: T1, p2: T2, p4: T4): T5 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 }, - p1: T1, - p2: T2, - p3: T3, - p4: T4 - ): { (): T5 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 }, - stub1: UnderscoreStatic, - p2: T2, - p3: T3, - p4: T4 - ): { (p1: T1): T5 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 }, - p1: T1, - stub2: UnderscoreStatic, - p3: T3, - p4: T4 - ): { (p2: T2): T5 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - p3: T3, - p4: T4 - ): { (p1: T1, p2: T2): T5 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 }, - p1: T1, - p2: T2, - stub3: UnderscoreStatic, - p4: T4 - ): { (p3: T3): T5 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 }, - stub1: UnderscoreStatic, - p2: T2, - stub3: UnderscoreStatic, - p4: T4 - ): { (p1: T1, p3: T3): T5 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 }, - p1: T1, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - p4: T4 - ): { (p2: T2, p3: T3): T5 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - p4: T4 - ): { (p1: T1, p2: T2, p3: T3): T5 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, - p1: T1 - ): { (p2: T2, p3: T3, p4: T4, p5: T5): T6 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, - p1: T1, - p2: T2 - ): { (p3: T3, p4: T4, p5: T5): T6 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, - stub1: UnderscoreStatic, - p2: T2 - ): { (p1: T1, p3: T3, p4: T4, p5: T5): T6 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, - p1: T1, - p2: T2, - p3: T3 - ): { (p4: T4, p5: T5): T6 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, - stub1: UnderscoreStatic, - p2: T2, - p3: T3 - ): { (p1: T1, p4: T4, p5: T5): T6 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, - p1: T1, - stub2: UnderscoreStatic, - p3: T3 - ): { (p2: T2, p4: T4, p5: T5): T6 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - p3: T3 - ): { (p1: T1, p2: T2, p4: T4, p5: T5): T6 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, - p1: T1, - p2: T2, - p3: T3, - p4: T4 - ): { (p5: T5): T6 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, - stub1: UnderscoreStatic, - p2: T2, - p3: T3, - p4: T4 - ): { (p1: T1, p5: T5): T6 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, - p1: T1, - stub2: UnderscoreStatic, - p3: T3, - p4: T4 - ): { (p2: T2, p5: T5): T6 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - p3: T3, - p4: T4 - ): { (p1: T1, p2: T2, p5: T5): T6 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, - p1: T1, - p2: T2, - stub3: UnderscoreStatic, - p4: T4 - ): { (p3: T3, p5: T5): T6 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, - stub1: UnderscoreStatic, - p2: T2, - stub3: UnderscoreStatic, - p4: T4 - ): { (p1: T1, p3: T3, p5: T5): T6 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, - p1: T1, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - p4: T4 - ): { (p2: T2, p3: T3, p5: T5): T6 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - p4: T4 - ): { (p1: T1, p2: T2, p3: T3, p5: T5): T6 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, - p1: T1, - p2: T2, - p3: T3, - p4: T4, - p5: T5 - ): { (): T6 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, - stub1: UnderscoreStatic, - p2: T2, - p3: T3, - p4: T4, - p5: T5 - ): { (p1: T1): T6 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, - p1: T1, - stub2: UnderscoreStatic, - p3: T3, - p4: T4, - p5: T5 - ): { (p2: T2): T6 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - p3: T3, - p4: T4, - p5: T5 - ): { (p1: T1, p2: T2): T6 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, - p1: T1, - p2: T2, - stub3: UnderscoreStatic, - p4: T4, - p5: T5 - ): { (p3: T3): T6 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, - stub1: UnderscoreStatic, - p2: T2, - stub3: UnderscoreStatic, - p4: T4, - p5: T5 - ): { (p1: T1, p3: T3): T6 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, - p1: T1, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - p4: T4, - p5: T5 - ): { (p2: T2, p3: T3): T6 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - p4: T4, - p5: T5 - ): { (p1: T1, p2: T2, p3: T3): T6 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, - p1: T1, - p2: T2, - p3: T3, - stub4: UnderscoreStatic, - p5: T5 - ): { (p4: T4): T6 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, - stub1: UnderscoreStatic, - p2: T2, - p3: T3, - stub4: UnderscoreStatic, - p5: T5 - ): { (p1: T1, p4: T4): T6 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, - p1: T1, - stub2: UnderscoreStatic, - p3: T3, - stub4: UnderscoreStatic, - p5: T5 - ): { (p2: T2, p4: T4): T6 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - p3: T3, - stub4: UnderscoreStatic, - p5: T5 - ): { (p1: T1, p2: T2, p4: T4): T6 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, - p1: T1, - p2: T2, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - p5: T5 - ): { (p3: T3, p4: T4): T6 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, - stub1: UnderscoreStatic, - p2: T2, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - p5: T5 - ): { (p1: T1, p3: T3, p4: T4): T6 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, - p1: T1, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - p5: T5 - ): { (p2: T2, p3: T3, p4: T4): T6 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - p5: T5 - ): { (p1: T1, p2: T2, p3: T3, p4: T4): T6 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - p1: T1 - ): { (p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - p1: T1, - p2: T2 - ): { (p3: T3, p4: T4, p5: T5, p6: T6): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - stub1: UnderscoreStatic, - p2: T2 - ): { (p1: T1, p3: T3, p4: T4, p5: T5, p6: T6): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - p1: T1, - p2: T2, - p3: T3 - ): { (p4: T4, p5: T5, p6: T6): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - stub1: UnderscoreStatic, - p2: T2, - p3: T3 - ): { (p1: T1, p4: T4, p5: T5, p6: T6): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - p1: T1, - stub2: UnderscoreStatic, - p3: T3 - ): { (p2: T2, p4: T4, p5: T5, p6: T6): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - p3: T3 - ): { (p1: T1, p2: T2, p4: T4, p5: T5, p6: T6): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - p1: T1, - p2: T2, - p3: T3, - p4: T4 - ): { (p5: T5, p6: T6): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - stub1: UnderscoreStatic, - p2: T2, - p3: T3, - p4: T4 - ): { (p1: T1, p5: T5, p6: T6): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - p1: T1, - stub2: UnderscoreStatic, - p3: T3, - p4: T4 - ): { (p2: T2, p5: T5, p6: T6): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - p3: T3, - p4: T4 - ): { (p1: T1, p2: T2, p5: T5, p6: T6): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - p1: T1, - p2: T2, - stub3: UnderscoreStatic, - p4: T4 - ): { (p3: T3, p5: T5, p6: T6): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - stub1: UnderscoreStatic, - p2: T2, - stub3: UnderscoreStatic, - p4: T4 - ): { (p1: T1, p3: T3, p5: T5, p6: T6): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - p1: T1, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - p4: T4 - ): { (p2: T2, p3: T3, p5: T5, p6: T6): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - p4: T4 - ): { (p1: T1, p2: T2, p3: T3, p5: T5, p6: T6): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - p1: T1, - p2: T2, - p3: T3, - p4: T4, - p5: T5 - ): { (p6: T6): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - stub1: UnderscoreStatic, - p2: T2, - p3: T3, - p4: T4, - p5: T5 - ): { (p1: T1, p6: T6): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - p1: T1, - stub2: UnderscoreStatic, - p3: T3, - p4: T4, - p5: T5 - ): { (p2: T2, p6: T6): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - p3: T3, - p4: T4, - p5: T5 - ): { (p1: T1, p2: T2, p6: T6): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - p1: T1, - p2: T2, - stub3: UnderscoreStatic, - p4: T4, - p5: T5 - ): { (p3: T3, p6: T6): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - stub1: UnderscoreStatic, - p2: T2, - stub3: UnderscoreStatic, - p4: T4, - p5: T5 - ): { (p1: T1, p3: T3, p6: T6): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - p1: T1, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - p4: T4, - p5: T5 - ): { (p2: T2, p3: T3, p6: T6): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - p4: T4, - p5: T5 - ): { (p1: T1, p2: T2, p3: T3, p6: T6): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - p1: T1, - p2: T2, - p3: T3, - stub4: UnderscoreStatic, - p5: T5 - ): { (p4: T4, p6: T6): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - stub1: UnderscoreStatic, - p2: T2, - p3: T3, - stub4: UnderscoreStatic, - p5: T5 - ): { (p1: T1, p4: T4, p6: T6): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - p1: T1, - stub2: UnderscoreStatic, - p3: T3, - stub4: UnderscoreStatic, - p5: T5 - ): { (p2: T2, p4: T4, p6: T6): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - p3: T3, - stub4: UnderscoreStatic, - p5: T5 - ): { (p1: T1, p2: T2, p4: T4, p6: T6): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - p1: T1, - p2: T2, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - p5: T5 - ): { (p3: T3, p4: T4, p6: T6): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - stub1: UnderscoreStatic, - p2: T2, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - p5: T5 - ): { (p1: T1, p3: T3, p4: T4, p6: T6): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - p1: T1, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - p5: T5 - ): { (p2: T2, p3: T3, p4: T4, p6: T6): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - p5: T5 - ): { (p1: T1, p2: T2, p3: T3, p4: T4, p6: T6): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - p1: T1, - p2: T2, - p3: T3, - p4: T4, - p5: T5, - p6: T6 - ): { (): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - stub1: UnderscoreStatic, - p2: T2, - p3: T3, - p4: T4, - p5: T5, - p6: T6 - ): { (p1: T1): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - p1: T1, - stub2: UnderscoreStatic, - p3: T3, - p4: T4, - p5: T5, - p6: T6 - ): { (p2: T2): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - p3: T3, - p4: T4, - p5: T5, - p6: T6 - ): { (p1: T1, p2: T2): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - p1: T1, - p2: T2, - stub3: UnderscoreStatic, - p4: T4, - p5: T5, - p6: T6 - ): { (p3: T3): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - stub1: UnderscoreStatic, - p2: T2, - stub3: UnderscoreStatic, - p4: T4, - p5: T5, - p6: T6 - ): { (p1: T1, p3: T3): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - p1: T1, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - p4: T4, - p5: T5, - p6: T6 - ): { (p2: T2, p3: T3): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - p4: T4, - p5: T5, - p6: T6 - ): { (p1: T1, p2: T2, p3: T3): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - p1: T1, - p2: T2, - p3: T3, - stub4: UnderscoreStatic, - p5: T5, - p6: T6 - ): { (p4: T4): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - stub1: UnderscoreStatic, - p2: T2, - p3: T3, - stub4: UnderscoreStatic, - p5: T5, - p6: T6 - ): { (p1: T1, p4: T4): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - p1: T1, - stub2: UnderscoreStatic, - p3: T3, - stub4: UnderscoreStatic, - p5: T5, - p6: T6 - ): { (p2: T2, p4: T4): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - p3: T3, - stub4: UnderscoreStatic, - p5: T5, - p6: T6 - ): { (p1: T1, p2: T2, p4: T4): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - p1: T1, - p2: T2, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - p5: T5, - p6: T6 - ): { (p3: T3, p4: T4): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - stub1: UnderscoreStatic, - p2: T2, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - p5: T5, - p6: T6 - ): { (p1: T1, p3: T3, p4: T4): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - p1: T1, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - p5: T5, - p6: T6 - ): { (p2: T2, p3: T3, p4: T4): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - p5: T5, - p6: T6 - ): { (p1: T1, p2: T2, p3: T3, p4: T4): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - p1: T1, - p2: T2, - p3: T3, - p4: T4, - stub5: UnderscoreStatic, - p6: T6 - ): { (p5: T5): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - stub1: UnderscoreStatic, - p2: T2, - p3: T3, - p4: T4, - stub5: UnderscoreStatic, - p6: T6 - ): { (p1: T1, p5: T5): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - p1: T1, - stub2: UnderscoreStatic, - p3: T3, - p4: T4, - stub5: UnderscoreStatic, - p6: T6 - ): { (p2: T2, p5: T5): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - p3: T3, - p4: T4, - stub5: UnderscoreStatic, - p6: T6 - ): { (p1: T1, p2: T2, p5: T5): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - p1: T1, - p2: T2, - stub3: UnderscoreStatic, - p4: T4, - stub5: UnderscoreStatic, - p6: T6 - ): { (p3: T3, p5: T5): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - stub1: UnderscoreStatic, - p2: T2, - stub3: UnderscoreStatic, - p4: T4, - stub5: UnderscoreStatic, - p6: T6 - ): { (p1: T1, p3: T3, p5: T5): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - p1: T1, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - p4: T4, - stub5: UnderscoreStatic, - p6: T6 - ): { (p2: T2, p3: T3, p5: T5): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - p4: T4, - stub5: UnderscoreStatic, - p6: T6 - ): { (p1: T1, p2: T2, p3: T3, p5: T5): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - p1: T1, - p2: T2, - p3: T3, - stub4: UnderscoreStatic, - stub5: UnderscoreStatic, - p6: T6 - ): { (p4: T4, p5: T5): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - stub1: UnderscoreStatic, - p2: T2, - p3: T3, - stub4: UnderscoreStatic, - stub5: UnderscoreStatic, - p6: T6 - ): { (p1: T1, p4: T4, p5: T5): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - p1: T1, - stub2: UnderscoreStatic, - p3: T3, - stub4: UnderscoreStatic, - stub5: UnderscoreStatic, - p6: T6 - ): { (p2: T2, p4: T4, p5: T5): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - p3: T3, - stub4: UnderscoreStatic, - stub5: UnderscoreStatic, - p6: T6 - ): { (p1: T1, p2: T2, p4: T4, p5: T5): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - p1: T1, - p2: T2, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - stub5: UnderscoreStatic, - p6: T6 - ): { (p3: T3, p4: T4, p5: T5): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - stub1: UnderscoreStatic, - p2: T2, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - stub5: UnderscoreStatic, - p6: T6 - ): { (p1: T1, p3: T3, p4: T4, p5: T5): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - p1: T1, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - stub5: UnderscoreStatic, - p6: T6 - ): { (p2: T2, p3: T3, p4: T4, p5: T5): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - stub5: UnderscoreStatic, - p6: T6 - ): { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5): T7 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1 - ): { (p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - p2: T2 - ): { (p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - p2: T2 - ): { (p1: T1, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - p2: T2, - p3: T3 - ): { (p4: T4, p5: T5, p6: T6, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - p2: T2, - p3: T3 - ): { (p1: T1, p4: T4, p5: T5, p6: T6, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - stub2: UnderscoreStatic, - p3: T3 - ): { (p2: T2, p4: T4, p5: T5, p6: T6, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - p3: T3 - ): { (p1: T1, p2: T2, p4: T4, p5: T5, p6: T6, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - p2: T2, - p3: T3, - p4: T4 - ): { (p5: T5, p6: T6, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - p2: T2, - p3: T3, - p4: T4 - ): { (p1: T1, p5: T5, p6: T6, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - stub2: UnderscoreStatic, - p3: T3, - p4: T4 - ): { (p2: T2, p5: T5, p6: T6, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - p3: T3, - p4: T4 - ): { (p1: T1, p2: T2, p5: T5, p6: T6, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - p2: T2, - stub3: UnderscoreStatic, - p4: T4 - ): { (p3: T3, p5: T5, p6: T6, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - p2: T2, - stub3: UnderscoreStatic, - p4: T4 - ): { (p1: T1, p3: T3, p5: T5, p6: T6, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - p4: T4 - ): { (p2: T2, p3: T3, p5: T5, p6: T6, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - p4: T4 - ): { (p1: T1, p2: T2, p3: T3, p5: T5, p6: T6, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - p2: T2, - p3: T3, - p4: T4, - p5: T5 - ): { (p6: T6, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - p2: T2, - p3: T3, - p4: T4, - p5: T5 - ): { (p1: T1, p6: T6, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - stub2: UnderscoreStatic, - p3: T3, - p4: T4, - p5: T5 - ): { (p2: T2, p6: T6, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - p3: T3, - p4: T4, - p5: T5 - ): { (p1: T1, p2: T2, p6: T6, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - p2: T2, - stub3: UnderscoreStatic, - p4: T4, - p5: T5 - ): { (p3: T3, p6: T6, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - p2: T2, - stub3: UnderscoreStatic, - p4: T4, - p5: T5 - ): { (p1: T1, p3: T3, p6: T6, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - p4: T4, - p5: T5 - ): { (p2: T2, p3: T3, p6: T6, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - p4: T4, - p5: T5 - ): { (p1: T1, p2: T2, p3: T3, p6: T6, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - p2: T2, - p3: T3, - stub4: UnderscoreStatic, - p5: T5 - ): { (p4: T4, p6: T6, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - p2: T2, - p3: T3, - stub4: UnderscoreStatic, - p5: T5 - ): { (p1: T1, p4: T4, p6: T6, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - stub2: UnderscoreStatic, - p3: T3, - stub4: UnderscoreStatic, - p5: T5 - ): { (p2: T2, p4: T4, p6: T6, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - p3: T3, - stub4: UnderscoreStatic, - p5: T5 - ): { (p1: T1, p2: T2, p4: T4, p6: T6, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - p2: T2, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - p5: T5 - ): { (p3: T3, p4: T4, p6: T6, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - p2: T2, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - p5: T5 - ): { (p1: T1, p3: T3, p4: T4, p6: T6, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - p5: T5 - ): { (p2: T2, p3: T3, p4: T4, p6: T6, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - p5: T5 - ): { (p1: T1, p2: T2, p3: T3, p4: T4, p6: T6, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - p2: T2, - p3: T3, - p4: T4, - p5: T5, - p6: T6 - ): { (p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - p2: T2, - p3: T3, - p4: T4, - p5: T5, - p6: T6 - ): { (p1: T1, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - stub2: UnderscoreStatic, - p3: T3, - p4: T4, - p5: T5, - p6: T6 - ): { (p2: T2, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - p3: T3, - p4: T4, - p5: T5, - p6: T6 - ): { (p1: T1, p2: T2, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - p2: T2, - stub3: UnderscoreStatic, - p4: T4, - p5: T5, - p6: T6 - ): { (p3: T3, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - p2: T2, - stub3: UnderscoreStatic, - p4: T4, - p5: T5, - p6: T6 - ): { (p1: T1, p3: T3, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - p4: T4, - p5: T5, - p6: T6 - ): { (p2: T2, p3: T3, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - p4: T4, - p5: T5, - p6: T6 - ): { (p1: T1, p2: T2, p3: T3, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - p2: T2, - p3: T3, - stub4: UnderscoreStatic, - p5: T5, - p6: T6 - ): { (p4: T4, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - p2: T2, - p3: T3, - stub4: UnderscoreStatic, - p5: T5, - p6: T6 - ): { (p1: T1, p4: T4, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - stub2: UnderscoreStatic, - p3: T3, - stub4: UnderscoreStatic, - p5: T5, - p6: T6 - ): { (p2: T2, p4: T4, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - p3: T3, - stub4: UnderscoreStatic, - p5: T5, - p6: T6 - ): { (p1: T1, p2: T2, p4: T4, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - p2: T2, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - p5: T5, - p6: T6 - ): { (p3: T3, p4: T4, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - p2: T2, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - p5: T5, - p6: T6 - ): { (p1: T1, p3: T3, p4: T4, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - p5: T5, - p6: T6 - ): { (p2: T2, p3: T3, p4: T4, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - p5: T5, - p6: T6 - ): { (p1: T1, p2: T2, p3: T3, p4: T4, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - p2: T2, - p3: T3, - p4: T4, - stub5: UnderscoreStatic, - p6: T6 - ): { (p5: T5, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - p2: T2, - p3: T3, - p4: T4, - stub5: UnderscoreStatic, - p6: T6 - ): { (p1: T1, p5: T5, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - stub2: UnderscoreStatic, - p3: T3, - p4: T4, - stub5: UnderscoreStatic, - p6: T6 - ): { (p2: T2, p5: T5, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - p3: T3, - p4: T4, - stub5: UnderscoreStatic, - p6: T6 - ): { (p1: T1, p2: T2, p5: T5, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - p2: T2, - stub3: UnderscoreStatic, - p4: T4, - stub5: UnderscoreStatic, - p6: T6 - ): { (p3: T3, p5: T5, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - p2: T2, - stub3: UnderscoreStatic, - p4: T4, - stub5: UnderscoreStatic, - p6: T6 - ): { (p1: T1, p3: T3, p5: T5, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - p4: T4, - stub5: UnderscoreStatic, - p6: T6 - ): { (p2: T2, p3: T3, p5: T5, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - p4: T4, - stub5: UnderscoreStatic, - p6: T6 - ): { (p1: T1, p2: T2, p3: T3, p5: T5, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - p2: T2, - p3: T3, - stub4: UnderscoreStatic, - stub5: UnderscoreStatic, - p6: T6 - ): { (p4: T4, p5: T5, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - p2: T2, - p3: T3, - stub4: UnderscoreStatic, - stub5: UnderscoreStatic, - p6: T6 - ): { (p1: T1, p4: T4, p5: T5, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - stub2: UnderscoreStatic, - p3: T3, - stub4: UnderscoreStatic, - stub5: UnderscoreStatic, - p6: T6 - ): { (p2: T2, p4: T4, p5: T5, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - p3: T3, - stub4: UnderscoreStatic, - stub5: UnderscoreStatic, - p6: T6 - ): { (p1: T1, p2: T2, p4: T4, p5: T5, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - p2: T2, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - stub5: UnderscoreStatic, - p6: T6 - ): { (p3: T3, p4: T4, p5: T5, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - p2: T2, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - stub5: UnderscoreStatic, - p6: T6 - ): { (p1: T1, p3: T3, p4: T4, p5: T5, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - stub5: UnderscoreStatic, - p6: T6 - ): { (p2: T2, p3: T3, p4: T4, p5: T5, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - stub5: UnderscoreStatic, - p6: T6 - ): { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p7: T7): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - p2: T2, - p3: T3, - p4: T4, - p5: T5, - p6: T6, - p7: T7 - ): { (): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - p2: T2, - p3: T3, - p4: T4, - p5: T5, - p6: T6, - p7: T7 - ): { (p1: T1): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - stub2: UnderscoreStatic, - p3: T3, - p4: T4, - p5: T5, - p6: T6, - p7: T7 - ): { (p2: T2): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - p3: T3, - p4: T4, - p5: T5, - p6: T6, - p7: T7 - ): { (p1: T1, p2: T2): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - p2: T2, - stub3: UnderscoreStatic, - p4: T4, - p5: T5, - p6: T6, - p7: T7 - ): { (p3: T3): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - p2: T2, - stub3: UnderscoreStatic, - p4: T4, - p5: T5, - p6: T6, - p7: T7 - ): { (p1: T1, p3: T3): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - p4: T4, - p5: T5, - p6: T6, - p7: T7 - ): { (p2: T2, p3: T3): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - p4: T4, - p5: T5, - p6: T6, - p7: T7 - ): { (p1: T1, p2: T2, p3: T3): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - p2: T2, - p3: T3, - stub4: UnderscoreStatic, - p5: T5, - p6: T6, - p7: T7 - ): { (p4: T4): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - p2: T2, - p3: T3, - stub4: UnderscoreStatic, - p5: T5, - p6: T6, - p7: T7 - ): { (p1: T1, p4: T4): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - stub2: UnderscoreStatic, - p3: T3, - stub4: UnderscoreStatic, - p5: T5, - p6: T6, - p7: T7 - ): { (p2: T2, p4: T4): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - p3: T3, - stub4: UnderscoreStatic, - p5: T5, - p6: T6, - p7: T7 - ): { (p1: T1, p2: T2, p4: T4): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - p2: T2, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - p5: T5, - p6: T6, - p7: T7 - ): { (p3: T3, p4: T4): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - p2: T2, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - p5: T5, - p6: T6, - p7: T7 - ): { (p1: T1, p3: T3, p4: T4): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - p5: T5, - p6: T6, - p7: T7 - ): { (p2: T2, p3: T3, p4: T4): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - p5: T5, - p6: T6, - p7: T7 - ): { (p1: T1, p2: T2, p3: T3, p4: T4): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - p2: T2, - p3: T3, - p4: T4, - stub5: UnderscoreStatic, - p6: T6, - p7: T7 - ): { (p5: T5): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - p2: T2, - p3: T3, - p4: T4, - stub5: UnderscoreStatic, - p6: T6, - p7: T7 - ): { (p1: T1, p5: T5): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - stub2: UnderscoreStatic, - p3: T3, - p4: T4, - stub5: UnderscoreStatic, - p6: T6, - p7: T7 - ): { (p2: T2, p5: T5): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - p3: T3, - p4: T4, - stub5: UnderscoreStatic, - p6: T6, - p7: T7 - ): { (p1: T1, p2: T2, p5: T5): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - p2: T2, - stub3: UnderscoreStatic, - p4: T4, - stub5: UnderscoreStatic, - p6: T6, - p7: T7 - ): { (p3: T3, p5: T5): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - p2: T2, - stub3: UnderscoreStatic, - p4: T4, - stub5: UnderscoreStatic, - p6: T6, - p7: T7 - ): { (p1: T1, p3: T3, p5: T5): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - p4: T4, - stub5: UnderscoreStatic, - p6: T6, - p7: T7 - ): { (p2: T2, p3: T3, p5: T5): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - p4: T4, - stub5: UnderscoreStatic, - p6: T6, - p7: T7 - ): { (p1: T1, p2: T2, p3: T3, p5: T5): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - p2: T2, - p3: T3, - stub4: UnderscoreStatic, - stub5: UnderscoreStatic, - p6: T6, - p7: T7 - ): { (p4: T4, p5: T5): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - p2: T2, - p3: T3, - stub4: UnderscoreStatic, - stub5: UnderscoreStatic, - p6: T6, - p7: T7 - ): { (p1: T1, p4: T4, p5: T5): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - stub2: UnderscoreStatic, - p3: T3, - stub4: UnderscoreStatic, - stub5: UnderscoreStatic, - p6: T6, - p7: T7 - ): { (p2: T2, p4: T4, p5: T5): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - p3: T3, - stub4: UnderscoreStatic, - stub5: UnderscoreStatic, - p6: T6, - p7: T7 - ): { (p1: T1, p2: T2, p4: T4, p5: T5): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - p2: T2, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - stub5: UnderscoreStatic, - p6: T6, - p7: T7 - ): { (p3: T3, p4: T4, p5: T5): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - p2: T2, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - stub5: UnderscoreStatic, - p6: T6, - p7: T7 - ): { (p1: T1, p3: T3, p4: T4, p5: T5): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - stub5: UnderscoreStatic, - p6: T6, - p7: T7 - ): { (p2: T2, p3: T3, p4: T4, p5: T5): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - stub5: UnderscoreStatic, - p6: T6, - p7: T7 - ): { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - p2: T2, - p3: T3, - p4: T4, - p5: T5, - stub6: UnderscoreStatic, - p7: T7 - ): { (p6: T6): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - p2: T2, - p3: T3, - p4: T4, - p5: T5, - stub6: UnderscoreStatic, - p7: T7 - ): { (p1: T1, p6: T6): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - stub2: UnderscoreStatic, - p3: T3, - p4: T4, - p5: T5, - stub6: UnderscoreStatic, - p7: T7 - ): { (p2: T2, p6: T6): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - p3: T3, - p4: T4, - p5: T5, - stub6: UnderscoreStatic, - p7: T7 - ): { (p1: T1, p2: T2, p6: T6): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - p2: T2, - stub3: UnderscoreStatic, - p4: T4, - p5: T5, - stub6: UnderscoreStatic, - p7: T7 - ): { (p3: T3, p6: T6): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - p2: T2, - stub3: UnderscoreStatic, - p4: T4, - p5: T5, - stub6: UnderscoreStatic, - p7: T7 - ): { (p1: T1, p3: T3, p6: T6): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - p4: T4, - p5: T5, - stub6: UnderscoreStatic, - p7: T7 - ): { (p2: T2, p3: T3, p6: T6): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - p4: T4, - p5: T5, - stub6: UnderscoreStatic, - p7: T7 - ): { (p1: T1, p2: T2, p3: T3, p6: T6): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - p2: T2, - p3: T3, - stub4: UnderscoreStatic, - p5: T5, - stub6: UnderscoreStatic, - p7: T7 - ): { (p4: T4, p6: T6): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - p2: T2, - p3: T3, - stub4: UnderscoreStatic, - p5: T5, - stub6: UnderscoreStatic, - p7: T7 - ): { (p1: T1, p4: T4, p6: T6): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - stub2: UnderscoreStatic, - p3: T3, - stub4: UnderscoreStatic, - p5: T5, - stub6: UnderscoreStatic, - p7: T7 - ): { (p2: T2, p4: T4, p6: T6): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - p3: T3, - stub4: UnderscoreStatic, - p5: T5, - stub6: UnderscoreStatic, - p7: T7 - ): { (p1: T1, p2: T2, p4: T4, p6: T6): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - p2: T2, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - p5: T5, - stub6: UnderscoreStatic, - p7: T7 - ): { (p3: T3, p4: T4, p6: T6): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - p2: T2, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - p5: T5, - stub6: UnderscoreStatic, - p7: T7 - ): { (p1: T1, p3: T3, p4: T4, p6: T6): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - p5: T5, - stub6: UnderscoreStatic, - p7: T7 - ): { (p2: T2, p3: T3, p4: T4, p6: T6): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - p5: T5, - stub6: UnderscoreStatic, - p7: T7 - ): { (p1: T1, p2: T2, p3: T3, p4: T4, p6: T6): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - p2: T2, - p3: T3, - p4: T4, - stub5: UnderscoreStatic, - stub6: UnderscoreStatic, - p7: T7 - ): { (p5: T5, p6: T6): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - p2: T2, - p3: T3, - p4: T4, - stub5: UnderscoreStatic, - stub6: UnderscoreStatic, - p7: T7 - ): { (p1: T1, p5: T5, p6: T6): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - stub2: UnderscoreStatic, - p3: T3, - p4: T4, - stub5: UnderscoreStatic, - stub6: UnderscoreStatic, - p7: T7 - ): { (p2: T2, p5: T5, p6: T6): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - p3: T3, - p4: T4, - stub5: UnderscoreStatic, - stub6: UnderscoreStatic, - p7: T7 - ): { (p1: T1, p2: T2, p5: T5, p6: T6): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - p2: T2, - stub3: UnderscoreStatic, - p4: T4, - stub5: UnderscoreStatic, - stub6: UnderscoreStatic, - p7: T7 - ): { (p3: T3, p5: T5, p6: T6): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - p2: T2, - stub3: UnderscoreStatic, - p4: T4, - stub5: UnderscoreStatic, - stub6: UnderscoreStatic, - p7: T7 - ): { (p1: T1, p3: T3, p5: T5, p6: T6): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - p4: T4, - stub5: UnderscoreStatic, - stub6: UnderscoreStatic, - p7: T7 - ): { (p2: T2, p3: T3, p5: T5, p6: T6): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - p4: T4, - stub5: UnderscoreStatic, - stub6: UnderscoreStatic, - p7: T7 - ): { (p1: T1, p2: T2, p3: T3, p5: T5, p6: T6): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - p2: T2, - p3: T3, - stub4: UnderscoreStatic, - stub5: UnderscoreStatic, - stub6: UnderscoreStatic, - p7: T7 - ): { (p4: T4, p5: T5, p6: T6): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - p2: T2, - p3: T3, - stub4: UnderscoreStatic, - stub5: UnderscoreStatic, - stub6: UnderscoreStatic, - p7: T7 - ): { (p1: T1, p4: T4, p5: T5, p6: T6): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - stub2: UnderscoreStatic, - p3: T3, - stub4: UnderscoreStatic, - stub5: UnderscoreStatic, - stub6: UnderscoreStatic, - p7: T7 - ): { (p2: T2, p4: T4, p5: T5, p6: T6): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - p3: T3, - stub4: UnderscoreStatic, - stub5: UnderscoreStatic, - stub6: UnderscoreStatic, - p7: T7 - ): { (p1: T1, p2: T2, p4: T4, p5: T5, p6: T6): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - p2: T2, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - stub5: UnderscoreStatic, - stub6: UnderscoreStatic, - p7: T7 - ): { (p3: T3, p4: T4, p5: T5, p6: T6): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - p2: T2, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - stub5: UnderscoreStatic, - stub6: UnderscoreStatic, - p7: T7 - ): { (p1: T1, p3: T3, p4: T4, p5: T5, p6: T6): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - p1: T1, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - stub5: UnderscoreStatic, - stub6: UnderscoreStatic, - p7: T7 - ): { (p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T8 }; - - partial( - fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7):T8 }, - stub1: UnderscoreStatic, - stub2: UnderscoreStatic, - stub3: UnderscoreStatic, - stub4: UnderscoreStatic, - stub5: UnderscoreStatic, - stub6: UnderscoreStatic, - p7: T7 - ): { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T8 }; + /** + * @see _.range + * @param stop Stop here. + * @return Array of numbers from 0 to `stop` with increments of 1. + * @note If start is not specified the implementation will never pull the step (step = arguments[2] || 0) + **/ + range(stop: number): number[]; - /** - * Memoizes a given function by caching the computed result. Useful for speeding up slow-running computations. - * If passed an optional hashFunction, it will be used to compute the hash key for storing the result, based - * on the arguments to the original function. The default hashFunction just uses the first argument to the - * memoized function as the key. - * @param fn Computationally expensive function that will now memoized results. - * @param hashFn Hash function for storing the result of `fn`. - * @return Memoized version of `fn`. - **/ - memoize( - fn: Function, - hashFn?: (...args: any[]) => string): Function; + /** + * Split an **array** into several arrays containing **count** or less elements + * of initial array. + * @param array The array to split + * @param count The maximum size of the inner arrays. + */ + chunk(array: _.Collection, count: number): (_.Collection)[] - /** - * Much like setTimeout, invokes function after wait milliseconds. If you pass the optional arguments, - * they will be forwarded on to the function when it is invoked. - * @param func Function to delay `waitMS` amount of ms. - * @param wait The amount of milliseconds to delay `fn`. - * @arguments Additional arguments to pass to `fn`. - **/ - delay( - func: Function, - wait: number, - ...arguments: any[]): any; + /************* + * Functions * + *************/ - /** - * @see _delay - **/ - delay( - func: Function, - ...arguments: any[]): any; + /** + * Bind a function to an object, meaning that whenever the function is called, the value of this will + * be the object. Optionally, bind arguments to the function to pre-fill them, also known as partial application. + * @param func The function to bind `this` to `object`. + * @param context The `this` pointer whenever `fn` is called. + * @param arguments Additional arguments to pass to `fn` when called. + * @return `fn` with `this` bound to `object`. + **/ + bind( + func: Function, + context: any, + ...args: any[]): () => any; - /** - * Defers invoking the function until the current call stack has cleared, similar to using setTimeout - * with a delay of 0. Useful for performing expensive computations or HTML rendering in chunks without - * blocking the UI thread from updating. If you pass the optional arguments, they will be forwarded on - * to the function when it is invoked. - * @param fn The function to defer. - * @param arguments Additional arguments to pass to `fn`. - **/ - defer( - fn: Function, - ...arguments: any[]): void; + /** + * Binds a number of methods on the object, specified by methodNames, to be run in the context of that object + * whenever they are invoked. Very handy for binding functions that are going to be used as event handlers, + * which would otherwise be invoked with a fairly useless this. If no methodNames are provided, all of the + * object's function properties will be bound to it. + * @param object The object to bind the methods `methodName` to. + * @param methodNames The methods to bind to `object`, optional and if not provided all of `object`'s + * methods are bound. + **/ + bindAll( + object: any, + ...methodNames: string[]): any; - /** - * Creates and returns a new, throttled version of the passed function, that, when invoked repeatedly, - * will only actually call the original function at most once per every wait milliseconds. Useful for - * rate-limiting events that occur faster than you can keep up with. - * By default, throttle will execute the function as soon as you call it for the first time, and, - * if you call it again any number of times during the wait period, as soon as that period is over. - * If you'd like to disable the leading-edge call, pass {leading: false}, and if you'd like to disable - * the execution on the trailing-edge, pass {trailing: false}. - * @param func Function to throttle `waitMS` ms. - * @param wait The number of milliseconds to wait before `fn` can be invoked again. - * @param options Allows for disabling execution of the throttled function on either the leading or trailing edge. - * @return `fn` with a throttle of `wait`. - **/ - throttle( - func: T, - wait: number, - options?: _.ThrottleSettings): T; + /** + * Partially apply a function by filling in any number of its arguments, without changing its dynamic this value. + * A close cousin of bind. You may pass _ in your list of arguments to specify an argument that should not be + * pre-filled, but left open to supply at call-time. + * @param fn Function to partially fill in arguments. + * @param arguments The partial arguments. + * @return `fn` with partially filled in arguments. + **/ - /** - * Creates and returns a new debounced version of the passed function that will postpone its execution - * until after wait milliseconds have elapsed since the last time it was invoked. Useful for implementing - * behavior that should only happen after the input has stopped arriving. For example: rendering a preview - * of a Markdown comment, recalculating a layout after the window has stopped being resized, and so on. - * - * Pass true for the immediate parameter to cause debounce to trigger the function on the leading instead - * of the trailing edge of the wait interval. Useful in circumstances like preventing accidental double - *-clicks on a "submit" button from firing a second time. - * @param fn Function to debounce `waitMS` ms. - * @param wait The number of milliseconds to wait before `fn` can be invoked again. - * @param immediate True if `fn` should be invoked on the leading edge of `waitMS` instead of the trailing edge. - * @return Debounced version of `fn` that waits `wait` ms when invoked. - **/ - debounce( - fn: T, - wait: number, - immediate?: boolean): T; + partial( + fn: { (p1: T1): T2 }, + p1: T1 + ): { (): T2 }; + + partial( + fn: { (p1: T1, p2: T2): T3 }, + p1: T1 + ): { (p2: T2): T3 }; + + partial( + fn: { (p1: T1, p2: T2): T3 }, + p1: T1, + p2: T2 + ): { (): T3 }; + + partial( + fn: { (p1: T1, p2: T2): T3 }, + stub1: UnderscoreStatic, + p2: T2 + ): { (p1: T1): T3 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3): T4 }, + p1: T1 + ): { (p2: T2, p3: T3): T4 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3): T4 }, + p1: T1, + p2: T2 + ): { (p3: T3): T4 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3): T4 }, + stub1: UnderscoreStatic, + p2: T2 + ): { (p1: T1, p3: T3): T4 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3): T4 }, + p1: T1, + p2: T2, + p3: T3 + ): { (): T4 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3): T4 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3 + ): { (p1: T1): T4 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3): T4 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3 + ): { (p2: T2): T4 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3): T4 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3 + ): { (p1: T1, p2: T2): T4 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4): T5 }, + p1: T1 + ): { (p2: T2, p3: T3, p4: T4): T5 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4): T5 }, + p1: T1, + p2: T2 + ): { (p3: T3, p4: T4): T5 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4): T5 }, + stub1: UnderscoreStatic, + p2: T2 + ): { (p1: T1, p3: T3, p4: T4): T5 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4): T5 }, + p1: T1, + p2: T2, + p3: T3 + ): { (p4: T4): T5 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4): T5 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3 + ): { (p1: T1, p4: T4): T5 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4): T5 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3 + ): { (p2: T2, p4: T4): T5 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4): T5 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3 + ): { (p1: T1, p2: T2, p4: T4): T5 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4): T5 }, + p1: T1, + p2: T2, + p3: T3, + p4: T4 + ): { (): T5 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4): T5 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + p4: T4 + ): { (p1: T1): T5 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4): T5 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + p4: T4 + ): { (p2: T2): T5 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4): T5 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + p4: T4 + ): { (p1: T1, p2: T2): T5 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4): T5 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + p4: T4 + ): { (p3: T3): T5 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4): T5 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + p4: T4 + ): { (p1: T1, p3: T3): T5 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4): T5 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4 + ): { (p2: T2, p3: T3): T5 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4): T5 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4 + ): { (p1: T1, p2: T2, p3: T3): T5 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5): T6 }, + p1: T1 + ): { (p2: T2, p3: T3, p4: T4, p5: T5): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5): T6 }, + p1: T1, + p2: T2 + ): { (p3: T3, p4: T4, p5: T5): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5): T6 }, + stub1: UnderscoreStatic, + p2: T2 + ): { (p1: T1, p3: T3, p4: T4, p5: T5): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5): T6 }, + p1: T1, + p2: T2, + p3: T3 + ): { (p4: T4, p5: T5): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5): T6 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3 + ): { (p1: T1, p4: T4, p5: T5): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5): T6 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3 + ): { (p2: T2, p4: T4, p5: T5): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5): T6 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3 + ): { (p1: T1, p2: T2, p4: T4, p5: T5): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5): T6 }, + p1: T1, + p2: T2, + p3: T3, + p4: T4 + ): { (p5: T5): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5): T6 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + p4: T4 + ): { (p1: T1, p5: T5): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5): T6 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + p4: T4 + ): { (p2: T2, p5: T5): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5): T6 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + p4: T4 + ): { (p1: T1, p2: T2, p5: T5): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5): T6 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + p4: T4 + ): { (p3: T3, p5: T5): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5): T6 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + p4: T4 + ): { (p1: T1, p3: T3, p5: T5): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5): T6 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4 + ): { (p2: T2, p3: T3, p5: T5): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5): T6 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4 + ): { (p1: T1, p2: T2, p3: T3, p5: T5): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5): T6 }, + p1: T1, + p2: T2, + p3: T3, + p4: T4, + p5: T5 + ): { (): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5): T6 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + p4: T4, + p5: T5 + ): { (p1: T1): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5): T6 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + p5: T5 + ): { (p2: T2): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5): T6 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + p5: T5 + ): { (p1: T1, p2: T2): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5): T6 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + p5: T5 + ): { (p3: T3): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5): T6 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + p5: T5 + ): { (p1: T1, p3: T3): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5): T6 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + p5: T5 + ): { (p2: T2, p3: T3): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5): T6 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + p5: T5 + ): { (p1: T1, p2: T2, p3: T3): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5): T6 }, + p1: T1, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + p5: T5 + ): { (p4: T4): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5): T6 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + p5: T5 + ): { (p1: T1, p4: T4): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5): T6 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + p5: T5 + ): { (p2: T2, p4: T4): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5): T6 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + p5: T5 + ): { (p1: T1, p2: T2, p4: T4): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5): T6 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5 + ): { (p3: T3, p4: T4): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5): T6 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5 + ): { (p1: T1, p3: T3, p4: T4): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5): T6 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5 + ): { (p2: T2, p3: T3, p4: T4): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5): T6 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5 + ): { (p1: T1, p2: T2, p3: T3, p4: T4): T6 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + p1: T1 + ): { (p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + p1: T1, + p2: T2 + ): { (p3: T3, p4: T4, p5: T5, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + stub1: UnderscoreStatic, + p2: T2 + ): { (p1: T1, p3: T3, p4: T4, p5: T5, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + p1: T1, + p2: T2, + p3: T3 + ): { (p4: T4, p5: T5, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3 + ): { (p1: T1, p4: T4, p5: T5, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3 + ): { (p2: T2, p4: T4, p5: T5, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3 + ): { (p1: T1, p2: T2, p4: T4, p5: T5, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + p1: T1, + p2: T2, + p3: T3, + p4: T4 + ): { (p5: T5, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + p4: T4 + ): { (p1: T1, p5: T5, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + p4: T4 + ): { (p2: T2, p5: T5, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + p4: T4 + ): { (p1: T1, p2: T2, p5: T5, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + p4: T4 + ): { (p3: T3, p5: T5, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + p4: T4 + ): { (p1: T1, p3: T3, p5: T5, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4 + ): { (p2: T2, p3: T3, p5: T5, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4 + ): { (p1: T1, p2: T2, p3: T3, p5: T5, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + p1: T1, + p2: T2, + p3: T3, + p4: T4, + p5: T5 + ): { (p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + p4: T4, + p5: T5 + ): { (p1: T1, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + p5: T5 + ): { (p2: T2, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + p5: T5 + ): { (p1: T1, p2: T2, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + p5: T5 + ): { (p3: T3, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + p5: T5 + ): { (p1: T1, p3: T3, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + p5: T5 + ): { (p2: T2, p3: T3, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + p5: T5 + ): { (p1: T1, p2: T2, p3: T3, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + p1: T1, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + p5: T5 + ): { (p4: T4, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + p5: T5 + ): { (p1: T1, p4: T4, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + p5: T5 + ): { (p2: T2, p4: T4, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + p5: T5 + ): { (p1: T1, p2: T2, p4: T4, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5 + ): { (p3: T3, p4: T4, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5 + ): { (p1: T1, p3: T3, p4: T4, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5 + ): { (p2: T2, p3: T3, p4: T4, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5 + ): { (p1: T1, p2: T2, p3: T3, p4: T4, p6: T6): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + p1: T1, + p2: T2, + p3: T3, + p4: T4, + p5: T5, + p6: T6 + ): { (): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + p4: T4, + p5: T5, + p6: T6 + ): { (p1: T1): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + p5: T5, + p6: T6 + ): { (p2: T2): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + p5: T5, + p6: T6 + ): { (p1: T1, p2: T2): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + p5: T5, + p6: T6 + ): { (p3: T3): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + p5: T5, + p6: T6 + ): { (p1: T1, p3: T3): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + p5: T5, + p6: T6 + ): { (p2: T2, p3: T3): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + p5: T5, + p6: T6 + ): { (p1: T1, p2: T2, p3: T3): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + p1: T1, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + p5: T5, + p6: T6 + ): { (p4: T4): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + p5: T5, + p6: T6 + ): { (p1: T1, p4: T4): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + p5: T5, + p6: T6 + ): { (p2: T2, p4: T4): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + p5: T5, + p6: T6 + ): { (p1: T1, p2: T2, p4: T4): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5, + p6: T6 + ): { (p3: T3, p4: T4): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5, + p6: T6 + ): { (p1: T1, p3: T3, p4: T4): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5, + p6: T6 + ): { (p2: T2, p3: T3, p4: T4): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5, + p6: T6 + ): { (p1: T1, p2: T2, p3: T3, p4: T4): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + p1: T1, + p2: T2, + p3: T3, + p4: T4, + stub5: UnderscoreStatic, + p6: T6 + ): { (p5: T5): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + p4: T4, + stub5: UnderscoreStatic, + p6: T6 + ): { (p1: T1, p5: T5): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + stub5: UnderscoreStatic, + p6: T6 + ): { (p2: T2, p5: T5): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + stub5: UnderscoreStatic, + p6: T6 + ): { (p1: T1, p2: T2, p5: T5): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + stub5: UnderscoreStatic, + p6: T6 + ): { (p3: T3, p5: T5): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + stub5: UnderscoreStatic, + p6: T6 + ): { (p1: T1, p3: T3, p5: T5): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + stub5: UnderscoreStatic, + p6: T6 + ): { (p2: T2, p3: T3, p5: T5): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + stub5: UnderscoreStatic, + p6: T6 + ): { (p1: T1, p2: T2, p3: T3, p5: T5): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + p1: T1, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6 + ): { (p4: T4, p5: T5): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6 + ): { (p1: T1, p4: T4, p5: T5): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6 + ): { (p2: T2, p4: T4, p5: T5): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6 + ): { (p1: T1, p2: T2, p4: T4, p5: T5): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6 + ): { (p3: T3, p4: T4, p5: T5): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6 + ): { (p1: T1, p3: T3, p4: T4, p5: T5): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6 + ): { (p2: T2, p3: T3, p4: T4, p5: T5): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6 + ): { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5): T7 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1 + ): { (p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + p2: T2 + ): { (p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + p2: T2 + ): { (p1: T1, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + p2: T2, + p3: T3 + ): { (p4: T4, p5: T5, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3 + ): { (p1: T1, p4: T4, p5: T5, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3 + ): { (p2: T2, p4: T4, p5: T5, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3 + ): { (p1: T1, p2: T2, p4: T4, p5: T5, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + p2: T2, + p3: T3, + p4: T4 + ): { (p5: T5, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + p4: T4 + ): { (p1: T1, p5: T5, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + p4: T4 + ): { (p2: T2, p5: T5, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + p4: T4 + ): { (p1: T1, p2: T2, p5: T5, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + p4: T4 + ): { (p3: T3, p5: T5, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + p4: T4 + ): { (p1: T1, p3: T3, p5: T5, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4 + ): { (p2: T2, p3: T3, p5: T5, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4 + ): { (p1: T1, p2: T2, p3: T3, p5: T5, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + p2: T2, + p3: T3, + p4: T4, + p5: T5 + ): { (p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + p4: T4, + p5: T5 + ): { (p1: T1, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + p5: T5 + ): { (p2: T2, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + p5: T5 + ): { (p1: T1, p2: T2, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + p5: T5 + ): { (p3: T3, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + p5: T5 + ): { (p1: T1, p3: T3, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + p5: T5 + ): { (p2: T2, p3: T3, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + p5: T5 + ): { (p1: T1, p2: T2, p3: T3, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + p5: T5 + ): { (p4: T4, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + p5: T5 + ): { (p1: T1, p4: T4, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + p5: T5 + ): { (p2: T2, p4: T4, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + p5: T5 + ): { (p1: T1, p2: T2, p4: T4, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5 + ): { (p3: T3, p4: T4, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5 + ): { (p1: T1, p3: T3, p4: T4, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5 + ): { (p2: T2, p3: T3, p4: T4, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5 + ): { (p1: T1, p2: T2, p3: T3, p4: T4, p6: T6, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + p2: T2, + p3: T3, + p4: T4, + p5: T5, + p6: T6 + ): { (p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + p4: T4, + p5: T5, + p6: T6 + ): { (p1: T1, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + p5: T5, + p6: T6 + ): { (p2: T2, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + p5: T5, + p6: T6 + ): { (p1: T1, p2: T2, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + p5: T5, + p6: T6 + ): { (p3: T3, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + p5: T5, + p6: T6 + ): { (p1: T1, p3: T3, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + p5: T5, + p6: T6 + ): { (p2: T2, p3: T3, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + p5: T5, + p6: T6 + ): { (p1: T1, p2: T2, p3: T3, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + p5: T5, + p6: T6 + ): { (p4: T4, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + p5: T5, + p6: T6 + ): { (p1: T1, p4: T4, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + p5: T5, + p6: T6 + ): { (p2: T2, p4: T4, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + p5: T5, + p6: T6 + ): { (p1: T1, p2: T2, p4: T4, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5, + p6: T6 + ): { (p3: T3, p4: T4, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5, + p6: T6 + ): { (p1: T1, p3: T3, p4: T4, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5, + p6: T6 + ): { (p2: T2, p3: T3, p4: T4, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5, + p6: T6 + ): { (p1: T1, p2: T2, p3: T3, p4: T4, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + p2: T2, + p3: T3, + p4: T4, + stub5: UnderscoreStatic, + p6: T6 + ): { (p5: T5, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + p4: T4, + stub5: UnderscoreStatic, + p6: T6 + ): { (p1: T1, p5: T5, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + stub5: UnderscoreStatic, + p6: T6 + ): { (p2: T2, p5: T5, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + stub5: UnderscoreStatic, + p6: T6 + ): { (p1: T1, p2: T2, p5: T5, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + stub5: UnderscoreStatic, + p6: T6 + ): { (p3: T3, p5: T5, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + stub5: UnderscoreStatic, + p6: T6 + ): { (p1: T1, p3: T3, p5: T5, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + stub5: UnderscoreStatic, + p6: T6 + ): { (p2: T2, p3: T3, p5: T5, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + stub5: UnderscoreStatic, + p6: T6 + ): { (p1: T1, p2: T2, p3: T3, p5: T5, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6 + ): { (p4: T4, p5: T5, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6 + ): { (p1: T1, p4: T4, p5: T5, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6 + ): { (p2: T2, p4: T4, p5: T5, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6 + ): { (p1: T1, p2: T2, p4: T4, p5: T5, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6 + ): { (p3: T3, p4: T4, p5: T5, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6 + ): { (p1: T1, p3: T3, p4: T4, p5: T5, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6 + ): { (p2: T2, p3: T3, p4: T4, p5: T5, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6 + ): { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p7: T7): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + p2: T2, + p3: T3, + p4: T4, + p5: T5, + p6: T6, + p7: T7 + ): { (): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + p4: T4, + p5: T5, + p6: T6, + p7: T7 + ): { (p1: T1): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + p5: T5, + p6: T6, + p7: T7 + ): { (p2: T2): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + p5: T5, + p6: T6, + p7: T7 + ): { (p1: T1, p2: T2): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + p5: T5, + p6: T6, + p7: T7 + ): { (p3: T3): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + p5: T5, + p6: T6, + p7: T7 + ): { (p1: T1, p3: T3): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + p5: T5, + p6: T6, + p7: T7 + ): { (p2: T2, p3: T3): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + p5: T5, + p6: T6, + p7: T7 + ): { (p1: T1, p2: T2, p3: T3): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + p5: T5, + p6: T6, + p7: T7 + ): { (p4: T4): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + p5: T5, + p6: T6, + p7: T7 + ): { (p1: T1, p4: T4): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + p5: T5, + p6: T6, + p7: T7 + ): { (p2: T2, p4: T4): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + p5: T5, + p6: T6, + p7: T7 + ): { (p1: T1, p2: T2, p4: T4): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5, + p6: T6, + p7: T7 + ): { (p3: T3, p4: T4): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5, + p6: T6, + p7: T7 + ): { (p1: T1, p3: T3, p4: T4): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5, + p6: T6, + p7: T7 + ): { (p2: T2, p3: T3, p4: T4): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5, + p6: T6, + p7: T7 + ): { (p1: T1, p2: T2, p3: T3, p4: T4): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + p2: T2, + p3: T3, + p4: T4, + stub5: UnderscoreStatic, + p6: T6, + p7: T7 + ): { (p5: T5): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + p4: T4, + stub5: UnderscoreStatic, + p6: T6, + p7: T7 + ): { (p1: T1, p5: T5): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + stub5: UnderscoreStatic, + p6: T6, + p7: T7 + ): { (p2: T2, p5: T5): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + stub5: UnderscoreStatic, + p6: T6, + p7: T7 + ): { (p1: T1, p2: T2, p5: T5): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + stub5: UnderscoreStatic, + p6: T6, + p7: T7 + ): { (p3: T3, p5: T5): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + stub5: UnderscoreStatic, + p6: T6, + p7: T7 + ): { (p1: T1, p3: T3, p5: T5): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + stub5: UnderscoreStatic, + p6: T6, + p7: T7 + ): { (p2: T2, p3: T3, p5: T5): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + stub5: UnderscoreStatic, + p6: T6, + p7: T7 + ): { (p1: T1, p2: T2, p3: T3, p5: T5): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6, + p7: T7 + ): { (p4: T4, p5: T5): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6, + p7: T7 + ): { (p1: T1, p4: T4, p5: T5): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6, + p7: T7 + ): { (p2: T2, p4: T4, p5: T5): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6, + p7: T7 + ): { (p1: T1, p2: T2, p4: T4, p5: T5): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6, + p7: T7 + ): { (p3: T3, p4: T4, p5: T5): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6, + p7: T7 + ): { (p1: T1, p3: T3, p4: T4, p5: T5): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6, + p7: T7 + ): { (p2: T2, p3: T3, p4: T4, p5: T5): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + p6: T6, + p7: T7 + ): { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + p2: T2, + p3: T3, + p4: T4, + p5: T5, + stub6: UnderscoreStatic, + p7: T7 + ): { (p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + p4: T4, + p5: T5, + stub6: UnderscoreStatic, + p7: T7 + ): { (p1: T1, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + p5: T5, + stub6: UnderscoreStatic, + p7: T7 + ): { (p2: T2, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + p5: T5, + stub6: UnderscoreStatic, + p7: T7 + ): { (p1: T1, p2: T2, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + p5: T5, + stub6: UnderscoreStatic, + p7: T7 + ): { (p3: T3, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + p5: T5, + stub6: UnderscoreStatic, + p7: T7 + ): { (p1: T1, p3: T3, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + p5: T5, + stub6: UnderscoreStatic, + p7: T7 + ): { (p2: T2, p3: T3, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + p5: T5, + stub6: UnderscoreStatic, + p7: T7 + ): { (p1: T1, p2: T2, p3: T3, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + p5: T5, + stub6: UnderscoreStatic, + p7: T7 + ): { (p4: T4, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + p5: T5, + stub6: UnderscoreStatic, + p7: T7 + ): { (p1: T1, p4: T4, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + p5: T5, + stub6: UnderscoreStatic, + p7: T7 + ): { (p2: T2, p4: T4, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + p5: T5, + stub6: UnderscoreStatic, + p7: T7 + ): { (p1: T1, p2: T2, p4: T4, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5, + stub6: UnderscoreStatic, + p7: T7 + ): { (p3: T3, p4: T4, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5, + stub6: UnderscoreStatic, + p7: T7 + ): { (p1: T1, p3: T3, p4: T4, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5, + stub6: UnderscoreStatic, + p7: T7 + ): { (p2: T2, p3: T3, p4: T4, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + p5: T5, + stub6: UnderscoreStatic, + p7: T7 + ): { (p1: T1, p2: T2, p3: T3, p4: T4, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + p2: T2, + p3: T3, + p4: T4, + stub5: UnderscoreStatic, + stub6: UnderscoreStatic, + p7: T7 + ): { (p5: T5, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + p4: T4, + stub5: UnderscoreStatic, + stub6: UnderscoreStatic, + p7: T7 + ): { (p1: T1, p5: T5, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + stub5: UnderscoreStatic, + stub6: UnderscoreStatic, + p7: T7 + ): { (p2: T2, p5: T5, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + p4: T4, + stub5: UnderscoreStatic, + stub6: UnderscoreStatic, + p7: T7 + ): { (p1: T1, p2: T2, p5: T5, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + stub5: UnderscoreStatic, + stub6: UnderscoreStatic, + p7: T7 + ): { (p3: T3, p5: T5, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + p4: T4, + stub5: UnderscoreStatic, + stub6: UnderscoreStatic, + p7: T7 + ): { (p1: T1, p3: T3, p5: T5, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + stub5: UnderscoreStatic, + stub6: UnderscoreStatic, + p7: T7 + ): { (p2: T2, p3: T3, p5: T5, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + p4: T4, + stub5: UnderscoreStatic, + stub6: UnderscoreStatic, + p7: T7 + ): { (p1: T1, p2: T2, p3: T3, p5: T5, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + stub6: UnderscoreStatic, + p7: T7 + ): { (p4: T4, p5: T5, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + p2: T2, + p3: T3, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + stub6: UnderscoreStatic, + p7: T7 + ): { (p1: T1, p4: T4, p5: T5, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + stub6: UnderscoreStatic, + p7: T7 + ): { (p2: T2, p4: T4, p5: T5, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + p3: T3, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + stub6: UnderscoreStatic, + p7: T7 + ): { (p1: T1, p2: T2, p4: T4, p5: T5, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + stub6: UnderscoreStatic, + p7: T7 + ): { (p3: T3, p4: T4, p5: T5, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + p2: T2, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + stub6: UnderscoreStatic, + p7: T7 + ): { (p1: T1, p3: T3, p4: T4, p5: T5, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + p1: T1, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + stub6: UnderscoreStatic, + p7: T7 + ): { (p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T8 }; + + partial( + fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6, p7: T7): T8 }, + stub1: UnderscoreStatic, + stub2: UnderscoreStatic, + stub3: UnderscoreStatic, + stub4: UnderscoreStatic, + stub5: UnderscoreStatic, + stub6: UnderscoreStatic, + p7: T7 + ): { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T8 }; - /** - * Creates a version of the function that can only be called one time. Repeated calls to the modified - * function will have no effect, returning the value from the original call. Useful for initialization - * functions, instead of having to set a boolean flag and then check it later. - * @param fn Function to only execute once. - * @return Copy of `fn` that can only be invoked once. - **/ - once(fn: T): T; + /** + * Memoizes a given function by caching the computed result. Useful for speeding up slow-running computations. + * If passed an optional hashFunction, it will be used to compute the hash key for storing the result, based + * on the arguments to the original function. The default hashFunction just uses the first argument to the + * memoized function as the key. + * @param fn Computationally expensive function that will now memoized results. + * @param hashFn Hash function for storing the result of `fn`. + * @return Memoized version of `fn`. + **/ + memoize( + fn: Function, + hashFn?: (...args: any[]) => string): Function; - /** - * Creates a version of the function that will only be run after first being called count times. Useful - * for grouping asynchronous responses, where you want to be sure that all the async calls have finished, - * before proceeding. - * @param number count Number of times to be called before actually executing. - * @param Function fn The function to defer execution `count` times. - * @return Copy of `fn` that will not execute until it is invoked `count` times. - **/ - after( - count: number, - fn: Function): Function; + /** + * Much like setTimeout, invokes function after wait milliseconds. If you pass the optional arguments, + * they will be forwarded on to the function when it is invoked. + * @param func Function to delay `waitMS` amount of ms. + * @param wait The amount of milliseconds to delay `fn`. + * @arguments Additional arguments to pass to `fn`. + **/ + delay( + func: Function, + wait: number, + ...args: any[]): any; - /** - * Creates a version of the function that can be called no more than count times. The result of - * the last function call is memoized and returned when count has been reached. - * @param number count The maxmimum number of times the function can be called. - * @param Function fn The function to limit the number of times it can be called. - * @return Copy of `fn` that can only be called `count` times. - **/ - before( - count: number, - fn: Function): Function; + /** + * @see _delay + **/ + delay( + func: Function, + ...args: any[]): any; - /** - * Wraps the first function inside of the wrapper function, passing it as the first argument. This allows - * the wrapper to execute code before and after the function runs, adjust the arguments, and execute it - * conditionally. - * @param fn Function to wrap. - * @param wrapper The function that will wrap `fn`. - * @return Wrapped version of `fn. - **/ - wrap( - fn: Function, - wrapper: (fn: Function, ...args: any[]) => any): Function; + /** + * Defers invoking the function until the current call stack has cleared, similar to using setTimeout + * with a delay of 0. Useful for performing expensive computations or HTML rendering in chunks without + * blocking the UI thread from updating. If you pass the optional arguments, they will be forwarded on + * to the function when it is invoked. + * @param fn The function to defer. + * @param arguments Additional arguments to pass to `fn`. + **/ + defer( + fn: Function, + ...args: any[]): void; - /** - * Returns a negated version of the pass-in predicate. - * @param (...args: any[]) => boolean predicate - * @return (...args: any[]) => boolean - **/ - negate(predicate: (...args: any[]) => boolean): (...args: any[]) => boolean; + /** + * Creates and returns a new, throttled version of the passed function, that, when invoked repeatedly, + * will only actually call the original function at most once per every wait milliseconds. Useful for + * rate-limiting events that occur faster than you can keep up with. + * By default, throttle will execute the function as soon as you call it for the first time, and, + * if you call it again any number of times during the wait period, as soon as that period is over. + * If you'd like to disable the leading-edge call, pass {leading: false}, and if you'd like to disable + * the execution on the trailing-edge, pass {trailing: false}. + * @param func Function to throttle `waitMS` ms. + * @param wait The number of milliseconds to wait before `fn` can be invoked again. + * @param options Allows for disabling execution of the throttled function on either the leading or trailing edge. + * @return `fn` with a throttle of `wait`. + **/ + throttle( + func: T, + wait: number, + options?: _.ThrottleSettings): T & _.Cancelable; - /** - * Returns the composition of a list of functions, where each function consumes the return value of the - * function that follows. In math terms, composing the functions f(), g(), and h() produces f(g(h())). - * @param functions List of functions to compose. - * @return Composition of `functions`. - **/ - compose(...functions: Function[]): Function; + /** + * Creates and returns a new debounced version of the passed function that will postpone its execution + * until after wait milliseconds have elapsed since the last time it was invoked. Useful for implementing + * behavior that should only happen after the input has stopped arriving. For example: rendering a preview + * of a Markdown comment, recalculating a layout after the window has stopped being resized, and so on. + * + * Pass true for the immediate parameter to cause debounce to trigger the function on the leading instead + * of the trailing edge of the wait interval. Useful in circumstances like preventing accidental double + *-clicks on a "submit" button from firing a second time. + * @param fn Function to debounce `waitMS` ms. + * @param wait The number of milliseconds to wait before `fn` can be invoked again. + * @param immediate True if `fn` should be invoked on the leading edge of `waitMS` instead of the trailing edge. + * @return Debounced version of `fn` that waits `wait` ms when invoked. + **/ + debounce( + fn: T, + wait: number, + immediate?: boolean): T & _.Cancelable; - /********** - * Objects * - ***********/ + /** + * Creates a version of the function that can only be called one time. Repeated calls to the modified + * function will have no effect, returning the value from the original call. Useful for initialization + * functions, instead of having to set a boolean flag and then check it later. + * @param fn Function to only execute once. + * @return Copy of `fn` that can only be invoked once. + **/ + once(fn: T): T; - /** - * Retrieve all the names of the object's properties. - * @param object Retrieve the key or property names from this object. - * @return List of all the property names on `object`. - **/ - keys(object: any): string[]; + /** + * Similar to ES6's rest param (http://ariya.ofilabs.com/2013/03/es6-and-rest-parameter.html) + * This accumulates the arguments passed into an array, after a given index. + **/ + restArgs(func: Function, starIndex?: number): Function; - /** - * Retrieve all the names of object's own and inherited properties. - * @param object Retrieve the key or property names from this object. - * @return List of all the property names on `object`. - **/ - allKeys(object: any): string[]; + /** + * Creates a version of the function that will only be run after first being called count times. Useful + * for grouping asynchronous responses, where you want to be sure that all the async calls have finished, + * before proceeding. + * @param number count Number of times to be called before actually executing. + * @param Function fn The function to defer execution `count` times. + * @return Copy of `fn` that will not execute until it is invoked `count` times. + **/ + after( + count: number, + fn: Function): Function; - /** - * Return all of the values of the object's properties. - * @param object Retrieve the values of all the properties on this object. - * @return List of all the values on `object`. - **/ - values(object: _.Dictionary): T[]; + /** + * Creates a version of the function that can be called no more than count times. The result of + * the last function call is memoized and returned when count has been reached. + * @param number count The maxmimum number of times the function can be called. + * @param Function fn The function to limit the number of times it can be called. + * @return Copy of `fn` that can only be called `count` times. + **/ + before( + count: number, + fn: Function): Function; - /** - * Return all of the values of the object's properties. - * @param object Retrieve the values of all the properties on this object. - * @return List of all the values on `object`. - **/ - values(object: any): any[]; + /** + * Wraps the first function inside of the wrapper function, passing it as the first argument. This allows + * the wrapper to execute code before and after the function runs, adjust the arguments, and execute it + * conditionally. + * @param fn Function to wrap. + * @param wrapper The function that will wrap `fn`. + * @return Wrapped version of `fn. + **/ + wrap( + fn: Function, + wrapper: (fn: Function, ...args: any[]) => any): Function; - /** - * Like map, but for objects. Transform the value of each property in turn. - * @param object The object to transform - * @param iteratee The function that transforms property values - * @param context The optional context (value of `this`) to bind to - * @return a new _.Dictionary of property values - */ - mapObject(object: _.Dictionary, iteratee: (val: T, key: string, object: _.Dictionary) => U, context?: any): _.Dictionary; + /** + * Returns a negated version of the pass-in predicate. + * @param (...args: any[]) => boolean predicate + * @return (...args: any[]) => boolean + **/ + negate(predicate: (...args: any[]) => boolean): (...args: any[]) => boolean; - /** - * Like map, but for objects. Transform the value of each property in turn. - * @param object The object to transform - * @param iteratee The function that tranforms property values - * @param context The optional context (value of `this`) to bind to - */ - mapObject(object: any, iteratee: (val: any, key: string, object: any) => T, context?: any): _.Dictionary; + /** + * Returns the composition of a list of functions, where each function consumes the return value of the + * function that follows. In math terms, composing the functions f(), g(), and h() produces f(g(h())). + * @param functions List of functions to compose. + * @return Composition of `functions`. + **/ + compose(...functions: Function[]): Function; - /** - * Like map, but for objects. Retrieves a property from each entry in the object, as if by _.property - * @param object The object to transform - * @param iteratee The property name to retrieve - * @param context The optional context (value of `this`) to bind to - */ - mapObject(object: any, iteratee: string, context?: any): _.Dictionary; + /********** + * Objects * + ***********/ - /** - * Convert an object into a list of [key, value] pairs. - * @param object Convert this object to a list of [key, value] pairs. - * @return List of [key, value] pairs on `object`. - **/ - pairs(object: any): any[][]; + /** + * Retrieve all the names of the object's properties. + * @param object Retrieve the key or property names from this object. + * @return List of all the property names on `object`. + **/ + keys(object: any): string[]; - /** - * Returns a copy of the object where the keys have become the values and the values the keys. - * For this to work, all of your object's values should be unique and string serializable. - * @param object Object to invert key/value pairs. - * @return An inverted key/value paired version of `object`. - **/ - invert(object: any): any; + /** + * Retrieve all the names of object's own and inherited properties. + * @param object Retrieve the key or property names from this object. + * @return List of all the property names on `object`. + **/ + allKeys(object: any): string[]; - /** - * Returns a sorted list of the names of every method in an object - that is to say, - * the name of every function property of the object. - * @param object Object to pluck all function property names from. - * @return List of all the function names on `object`. - **/ - functions(object: any): string[]; + /** + * Return all of the values of the object's properties. + * @param object Retrieve the values of all the properties on this object. + * @return List of all the values on `object`. + **/ + values(object: _.Dictionary): T[]; - /** - * @see _functions - **/ - methods(object: any): string[]; + /** + * Return all of the values of the object's properties. + * @param object Retrieve the values of all the properties on this object. + * @return List of all the values on `object`. + **/ + values(object: any): any[]; - /** - * Copy all of the properties in the source objects over to the destination object, and return - * the destination object. It's in-order, so the last source will override properties of the - * same name in previous arguments. - * @param destination Object to extend all the properties from `sources`. - * @param sources Extends `destination` with all properties from these source objects. - * @return `destination` extended with all the properties from the `sources` objects. - **/ - extend( - destination: any, - ...sources: any[]): any; + /** + * Like map, but for objects. Transform the value of each property in turn. + * @param object The object to transform + * @param iteratee The function that transforms property values + * @param context The optional context (value of `this`) to bind to + * @return a new _.Dictionary of property values + */ + mapObject(object: _.Dictionary, iteratee: (val: T, key: string, object: _.Dictionary) => U, context?: any): _.Dictionary; - /** - * Like extend, but only copies own properties over to the destination object. (alias: assign) - */ - extendOwn( - destination: any, - ...source: any[]): any; + /** + * Like map, but for objects. Transform the value of each property in turn. + * @param object The object to transform + * @param iteratee The function that tranforms property values + * @param context The optional context (value of `this`) to bind to + */ + mapObject(object: any, iteratee: (val: any, key: string, object: any) => T, context?: any): _.Dictionary; - /** - * Like extend, but only copies own properties over to the destination object. (alias: extendOwn) - */ - assign( - destination: any, - ...source: any[]): any; + /** + * Like map, but for objects. Retrieves a property from each entry in the object, as if by _.property + * @param object The object to transform + * @param iteratee The property name to retrieve + * @param context The optional context (value of `this`) to bind to + */ + mapObject(object: any, iteratee: string, context?: any): _.Dictionary; - /** - * Return a copy of the object, filtered to only have values for the whitelisted keys - * (or array of valid keys). - * @param object Object to strip unwanted key/value pairs. - * @keys The key/value pairs to keep on `object`. - * @return Copy of `object` with only the `keys` properties. - **/ - pick( - object: any, - ...keys: any[]): any; + /** + * Convert an object into a list of [key, value] pairs. + * @param object Convert this object to a list of [key, value] pairs. + * @return List of [key, value] pairs on `object`. + **/ + pairs(object: any): any[][]; - /** - * @see _.pick - **/ - pick( - object: any, - fn: (value: any, key: any, object: any) => any): any; + /** + * Returns a copy of the object where the keys have become the values and the values the keys. + * For this to work, all of your object's values should be unique and string serializable. + * @param object Object to invert key/value pairs. + * @return An inverted key/value paired version of `object`. + **/ + invert(object: any): any; - /** - * Return a copy of the object, filtered to omit the blacklisted keys (or array of keys). - * @param object Object to strip unwanted key/value pairs. - * @param keys The key/value pairs to remove on `object`. - * @return Copy of `object` without the `keys` properties. - **/ - omit( - object: any, - ...keys: string[]): any; + /** + * Returns a sorted list of the names of every method in an object - that is to say, + * the name of every function property of the object. + * @param object Object to pluck all function property names from. + * @return List of all the function names on `object`. + **/ + functions(object: any): string[]; - /** - * @see _.omit - **/ - omit( - object: any, - keys: string[]): any; + /** + * @see _functions + **/ + methods(object: any): string[]; - /** - * @see _.omit - **/ - omit( - object: any, - iteratee: Function): any; + /** + * Copy all of the properties in the source objects over to the destination object, and return + * the destination object. It's in-order, so the last source will override properties of the + * same name in previous arguments. + * @param destination Object to extend all the properties from `sources`. + * @param sources Extends `destination` with all properties from these source objects. + * @return `destination` extended with all the properties from the `sources` objects. + **/ + extend( + destination: any, + ...sources: any[]): any; - /** - * Fill in null and undefined properties in object with values from the defaults objects, - * and return the object. As soon as the property is filled, further defaults will have no effect. - * @param object Fill this object with default values. - * @param defaults The default values to add to `object`. - * @return `object` with added `defaults` values. - **/ - defaults( - object: any, - ...defaults: any[]): any; + /** + * Like extend, but only copies own properties over to the destination object. (alias: assign) + */ + extendOwn( + destination: any, + ...source: any[]): any; - /** - * Create a shallow-copied clone of the object. - * Any nested objects or arrays will be copied by reference, not duplicated. - * @param object Object to clone. - * @return Copy of `object`. - **/ - clone(object: T): T; + /** + * Like extend, but only copies own properties over to the destination object. (alias: extendOwn) + */ + assign( + destination: any, + ...source: any[]): any; - /** - * Invokes interceptor with the object, and then returns object. The primary purpose of this method - * is to "tap into" a method chain, in order to perform operations on intermediate results within the chain. - * @param object Argument to `interceptor`. - * @param intercepter The function to modify `object` before continuing the method chain. - * @return Modified `object`. - **/ - tap(object: T, intercepter: Function): T; + /** + * Returns the first key on an object that passes a predicate test. + * @param obj the object to search in + * @param predicate Predicate function. + * @param context `this` object in `iterator`, optional. + */ + findKey(obj: _.Dictionary, predicate: _.ObjectIterator, context?: any): string; - /** - * Does the object contain the given key? Identical to object.hasOwnProperty(key), but uses a safe - * reference to the hasOwnProperty function, in case it's been overridden accidentally. - * @param object Object to check for `key`. - * @param key The key to check for on `object`. - * @return True if `key` is a property on `object`, otherwise false. - **/ - has(object: any, key: string): boolean; + /** + * Return a copy of the object, filtered to only have values for the whitelisted keys + * (or array of valid keys). + * @param object Object to strip unwanted key/value pairs. + * @keys The key/value pairs to keep on `object`. + * @return Copy of `object` with only the `keys` properties. + **/ + pick( + object: any, + ...keys: any[]): any; - /** - * Returns a predicate function that will tell you if a passed in object contains all of the key/value properties present in attrs. - * @param attrs Object with key values pair - * @return Predicate function - **/ - matches(attrs: T): _.ListIterator; + /** + * @see _.pick + **/ + pick( + object: any, + fn: (value: any, key: any, object: any) => any): any; - /** - * Returns a function that will itself return the key property of any passed-in object. - * @param key Property of the object. - * @return Function which accept an object an returns the value of key in that object. - **/ - property(key: string): (object: Object) => any; + /** + * Return a copy of the object, filtered to omit the blacklisted keys (or array of keys). + * @param object Object to strip unwanted key/value pairs. + * @param keys The key/value pairs to remove on `object`. + * @return Copy of `object` without the `keys` properties. + **/ + omit( + object: any, + ...keys: string[]): any; - /** - * Returns a function that will itself return the value of a object key property. - * @param key The object to get the property value from. - * @return Function which accept a key property in `object` and returns its value. - **/ - propertyOf(object: Object): (key: string) => any; + /** + * @see _.omit + **/ + omit( + object: any, + keys: string[]): any; - /** - * Performs an optimized deep comparison between the two objects, - * to determine if they should be considered equal. - * @param object Compare to `other`. - * @param other Compare to `object`. - * @return True if `object` is equal to `other`. - **/ - isEqual(object: any, other: any): boolean; + /** + * @see _.omit + **/ + omit( + object: any, + iteratee: Function): any; - /** - * Returns true if object contains no values. - * @param object Check if this object has no properties or values. - * @return True if `object` is empty. - **/ - isEmpty(object: any): boolean; + /** + * Fill in null and undefined properties in object with values from the defaults objects, + * and return the object. As soon as the property is filled, further defaults will have no effect. + * @param object Fill this object with default values. + * @param defaults The default values to add to `object`. + * @return `object` with added `defaults` values. + **/ + defaults( + object: any, + ...defaults: any[]): any; - /** - * Returns true if the keys and values in `properties` matches with the `object` properties. - * @param object Object to be compared with `properties`. - * @param properties Properties be compared with `object` - * @return True if `object` has matching keys and values, otherwise false. - **/ - isMatch(object:any, properties:any): boolean; - /** - * Returns true if object is a DOM element. - * @param object Check if this object is a DOM element. - * @return True if `object` is a DOM element, otherwise false. - **/ - isElement(object: any): object is Element; + /** + * Creates an object that inherits from the given prototype object. + * If additional properties are provided then they will be added to the + * created object. + * @param prototype The prototype that the returned object will inherit from. + * @param props Additional props added to the returned object. + **/ + create(prototype: any, props?: Object): any; - /** - * Returns true if object is an Array. - * @param object Check if this object is an Array. - * @return True if `object` is an Array, otherwise false. - **/ - isArray(object: any): object is []; + /** + * Create a shallow-copied clone of the object. + * Any nested objects or arrays will be copied by reference, not duplicated. + * @param object Object to clone. + * @return Copy of `object`. + **/ + clone(object: T): T; - /** - * Returns true if object is an Array. - * @param object Check if this object is an Array. - * @return True if `object` is an Array, otherwise false. - **/ - isArray(object: any): object is T[]; + /** + * Invokes interceptor with the object, and then returns object. The primary purpose of this method + * is to "tap into" a method chain, in order to perform operations on intermediate results within the chain. + * @param object Argument to `interceptor`. + * @param intercepter The function to modify `object` before continuing the method chain. + * @return Modified `object`. + **/ + tap(object: T, intercepter: Function): T; - /** - * Returns true if value is an Object. Note that JavaScript arrays and functions are objects, - * while (normal) strings and numbers are not. - * @param object Check if this object is an Object. - * @return True of `object` is an Object, otherwise false. - **/ - isObject(object: any): boolean; + /** + * Does the object contain the given key? Identical to object.hasOwnProperty(key), but uses a safe + * reference to the hasOwnProperty function, in case it's been overridden accidentally. + * @param object Object to check for `key`. + * @param key The key to check for on `object`. + * @return True if `key` is a property on `object`, otherwise false. + **/ + has(object: any, key: string): boolean; - /** - * Returns true if object is an Arguments object. - * @param object Check if this object is an Arguments object. - * @return True if `object` is an Arguments object, otherwise false. - **/ - isArguments(object: any): object is IArguments; + /** + * Returns a predicate function that will tell you if a passed in object contains all of the key/value properties present in attrs. + * @param attrs Object with key values pair + * @return Predicate function + **/ + matches(attrs: T): _.ListIterator; - /** - * Returns true if object is a Function. - * @param object Check if this object is a Function. - * @return True if `object` is a Function, otherwise false. - **/ - isFunction(object: any): object is Function; + /** + * Returns a predicate function that will tell you if a passed in object contains all of the key/value properties present in attrs. + * @see _.matches + * @param attrs Object with key values pair + * @return Predicate function + **/ + matcher(attrs: T): _.ListIterator; - /** - * Returns true if object inherits from an Error. - * @param object Check if this object is an Error. - * @return True if `object` is a Error, otherwise false. - **/ - isError(object:any): object is Error; + /** + * Returns a function that will itself return the key property of any passed-in object. + * @param key Property of the object. + * @return Function which accept an object an returns the value of key in that object. + **/ + property(key: string): (object: Object) => any; - /** - * Returns true if object is a String. - * @param object Check if this object is a String. - * @return True if `object` is a String, otherwise false. - **/ - isString(object: any): object is string; + /** + * Returns a function that will itself return the value of a object key property. + * @param key The object to get the property value from. + * @return Function which accept a key property in `object` and returns its value. + **/ + propertyOf(object: Object): (key: string) => any; - /** - * Returns true if object is a Number (including NaN). - * @param object Check if this object is a Number. - * @return True if `object` is a Number, otherwise false. - **/ - isNumber(object: any): object is number; + /** + * Performs an optimized deep comparison between the two objects, + * to determine if they should be considered equal. + * @param object Compare to `other`. + * @param other Compare to `object`. + * @return True if `object` is equal to `other`. + **/ + isEqual(object: any, other: any): boolean; - /** - * Returns true if object is a finite Number. - * @param object Check if this object is a finite Number. - * @return True if `object` is a finite Number. - **/ - isFinite(object: any): boolean; + /** + * Returns true if object contains no values. + * @param object Check if this object has no properties or values. + * @return True if `object` is empty. + **/ + isEmpty(object: any): boolean; - /** - * Returns true if object is either true or false. - * @param object Check if this object is a bool. - * @return True if `object` is a bool, otherwise false. - **/ - isBoolean(object: any): object is boolean; + /** + * Returns true if the keys and values in `properties` matches with the `object` properties. + * @param object Object to be compared with `properties`. + * @param properties Properties be compared with `object` + * @return True if `object` has matching keys and values, otherwise false. + **/ + isMatch(object: any, properties: any): boolean; - /** - * Returns true if object is a Date. - * @param object Check if this object is a Date. - * @return True if `object` is a Date, otherwise false. - **/ - isDate(object: any): object is Date; + /** + * Returns true if object is a DOM element. + * @param object Check if this object is a DOM element. + * @return True if `object` is a DOM element, otherwise false. + **/ + isElement(object: any): object is Element; - /** - * Returns true if object is a RegExp. - * @param object Check if this object is a RegExp. - * @return True if `object` is a RegExp, otherwise false. - **/ - isRegExp(object: any): object is RegExp; + /** + * Returns true if object is an Array. + * @param object Check if this object is an Array. + * @return True if `object` is an Array, otherwise false. + **/ + isArray(object: any): object is any[]; - /** - * Returns true if object is NaN. - * Note: this is not the same as the native isNaN function, - * which will also return true if the variable is undefined. - * @param object Check if this object is NaN. - * @return True if `object` is NaN, otherwise false. - **/ - isNaN(object: any): boolean; + /** + * Returns true if object is an Array. + * @param object Check if this object is an Array. + * @return True if `object` is an Array, otherwise false. + **/ + isArray(object: any): object is T[]; - /** - * Returns true if the value of object is null. - * @param object Check if this object is null. - * @return True if `object` is null, otherwise false. - **/ - isNull(object: any): boolean; + /** + * Returns true if object is a Symbol. + * @param object Check if this object is a Symbol. + * @return True if `object` is a Symbol, otherwise false. + **/ + isSymbol(object: any): object is symbol; - /** - * Returns true if value is undefined. - * @param object Check if this object is undefined. - * @return True if `object` is undefined, otherwise false. - **/ - isUndefined(value: any): boolean; + /** + * Returns true if value is an Object. Note that JavaScript arrays and functions are objects, + * while (normal) strings and numbers are not. + * @param object Check if this object is an Object. + * @return True of `object` is an Object, otherwise false. + **/ + isObject(object: any): boolean; - /* ********* - * Utility * - ********** */ + /** + * Returns true if object is an Arguments object. + * @param object Check if this object is an Arguments object. + * @return True if `object` is an Arguments object, otherwise false. + **/ + isArguments(object: any): object is IArguments; - /** - * Give control of the "_" variable back to its previous owner. - * Returns a reference to the Underscore object. - * @return Underscore object reference. - **/ - noConflict(): any; + /** + * Returns true if object is a Function. + * @param object Check if this object is a Function. + * @return True if `object` is a Function, otherwise false. + **/ + isFunction(object: any): object is Function; - /** - * Returns the same value that is used as the argument. In math: f(x) = x - * This function looks useless, but is used throughout Underscore as a default iterator. - * @param value Identity of this object. - * @return `value`. - **/ - identity(value: T): T; + /** + * Returns true if object inherits from an Error. + * @param object Check if this object is an Error. + * @return True if `object` is a Error, otherwise false. + **/ + isError(object: any): object is Error; - /** - * Creates a function that returns the same value that is used as the argument of _.constant - * @param value Identity of this object. - * @return Function that return value. - **/ - constant(value: T): () => T; + /** + * Returns true if object is a String. + * @param object Check if this object is a String. + * @return True if `object` is a String, otherwise false. + **/ + isString(object: any): object is string; - /** - * Returns undefined irrespective of the arguments passed to it. Useful as the default - * for optional callback arguments. - * Note there is no way to indicate a 'undefined' return, so it is currently typed as void. - * @return undefined - **/ - noop(): void; + /** + * Returns true if object is a Number (including NaN). + * @param object Check if this object is a Number. + * @return True if `object` is a Number, otherwise false. + **/ + isNumber(object: any): object is number; - /** - * Invokes the given iterator function n times. - * Each invocation of iterator is called with an index argument - * @param n Number of times to invoke `iterator`. - * @param iterator Function iterator to invoke `n` times. - * @param context `this` object in `iterator`, optional. - **/ - times(n: number, iterator: (n: number) => TResult, context?: any): TResult[]; + /** + * Returns true if object is a finite Number. + * @param object Check if this object is a finite Number. + * @return True if `object` is a finite Number. + **/ + isFinite(object: any): boolean; - /** - * Returns a random integer between min and max, inclusive. If you only pass one argument, - * it will return a number between 0 and that number. - * @param max The maximum random number. - * @return A random number between 0 and `max`. - **/ - random(max: number): number; + /** + * Returns true if object is either true or false. + * @param object Check if this object is a bool. + * @return True if `object` is a bool, otherwise false. + **/ + isBoolean(object: any): object is boolean; - /** - * @see _.random - * @param min The minimum random number. - * @return A random number between `min` and `max`. - **/ - random(min: number, max: number): number; + /** + * Returns true if object is a Date. + * @param object Check if this object is a Date. + * @return True if `object` is a Date, otherwise false. + **/ + isDate(object: any): object is Date; - /** - * Allows you to extend Underscore with your own utility functions. Pass a hash of - * {name: function} definitions to have your functions added to the Underscore object, - * as well as the OOP wrapper. - * @param object Mixin object containing key/function pairs to add to the Underscore object. - **/ - mixin(object: any): void; + /** + * Returns true if object is a RegExp. + * @param object Check if this object is a RegExp. + * @return True if `object` is a RegExp, otherwise false. + **/ + isRegExp(object: any): object is RegExp; - /** - * A mostly-internal function to generate callbacks that can be applied to each element - * in a collection, returning the desired result -- either identity, an arbitrary callback, - * a property matcher, or a propetery accessor. - * @param string|Function|Object value The value to iterate over, usually the key. - * @param any context - * @param number argCount - * @return Callback that can be applied to each element in a collection. - **/ - iteratee(value: string): Function; - iteratee(value: Function, context?: any, argCount?: number): Function; - iteratee(value: Object): Function; + /** + * Returns true if object is NaN. + * Note: this is not the same as the native isNaN function, + * which will also return true if the variable is undefined. + * @param object Check if this object is NaN. + * @return True if `object` is NaN, otherwise false. + **/ + isNaN(object: any): boolean; - /** - * Generate a globally-unique id for client-side models or DOM elements that need one. - * If prefix is passed, the id will be appended to it. Without prefix, returns an integer. - * @param prefix A prefix string to start the unique ID with. - * @return Unique string ID beginning with `prefix`. - **/ - uniqueId(prefix?: string): string; + /** + * Returns true if the value of object is null. + * @param object Check if this object is null. + * @return True if `object` is null, otherwise false. + **/ + isNull(object: any): boolean; - /** - * Escapes a string for insertion into HTML, replacing &, <, >, ", ', and / characters. - * @param str Raw string to escape. - * @return `str` HTML escaped. - **/ - escape(str: string): string; + /** + * Returns true if value is undefined. + * @param object Check if this object is undefined. + * @return True if `object` is undefined, otherwise false. + **/ + isUndefined(value: any): boolean; - /** - * The opposite of escape, replaces &, <, >, ", and ' with their unescaped counterparts. - * @param str HTML escaped string. - * @return `str` Raw string. - **/ - unescape(str: string): string; + /* ********* + * Utility * + ********** */ - /** - * If the value of the named property is a function then invoke it; otherwise, return it. - * @param object Object to maybe invoke function `property` on. - * @param property The function by name to invoke on `object`. - * @param defaultValue The value to be returned in case `property` doesn't exist or is undefined. - * @return The result of invoking the function `property` on `object. - **/ - result(object: any, property: string, defaultValue?:any): any; + /** + * Give control of the "_" variable back to its previous owner. + * Returns a reference to the Underscore object. + * @return Underscore object reference. + **/ + noConflict(): any; - /** - * Compiles JavaScript templates into functions that can be evaluated for rendering. Useful - * for rendering complicated bits of HTML from JSON data sources. Template functions can both - * interpolate variables, using <%= ... %>, as well as execute arbitrary JavaScript code, with - * <% ... %>. If you wish to interpolate a value, and have it be HTML-escaped, use <%- ... %> When - * you evaluate a template function, pass in a data object that has properties corresponding to - * the template's free variables. If you're writing a one-off, you can pass the data object as - * the second parameter to template in order to render immediately instead of returning a template - * function. The settings argument should be a hash containing any _.templateSettings that should - * be overridden. - * @param templateString Underscore HTML template. - * @param data Data to use when compiling `templateString`. - * @param settings Settings to use while compiling. - * @return Returns the compiled Underscore HTML template. - **/ - template(templateString: string, settings?: _.TemplateSettings): (...data: any[]) => string; + /** + * Returns the same value that is used as the argument. In math: f(x) = x + * This function looks useless, but is used throughout Underscore as a default iterator. + * @param value Identity of this object. + * @return `value`. + **/ + identity(value: T): T; - /** - * By default, Underscore uses ERB-style template delimiters, change the - * following template settings to use alternative delimiters. - **/ - templateSettings: _.TemplateSettings; + /** + * Creates a function that returns the same value that is used as the argument of _.constant + * @param value Identity of this object. + * @return Function that return value. + **/ + constant(value: T): () => T; - /** - * Returns an integer timestamp for the current time, using the fastest method available in the runtime. Useful for implementing timing/animation functions. - **/ - now(): number; + /** + * Returns undefined irrespective of the arguments passed to it. Useful as the default + * for optional callback arguments. + * Note there is no way to indicate a 'undefined' return, so it is currently typed as void. + * @return undefined + **/ + noop(): void; - /* ********** - * Chaining * - *********** */ + /** + * Invokes the given iterator function n times. + * Each invocation of iterator is called with an index argument + * @param n Number of times to invoke `iterator`. + * @param iterator Function iterator to invoke `n` times. + * @param context `this` object in `iterator`, optional. + **/ + times(n: number, iterator: (n: number) => TResult, context?: any): TResult[]; - /** - * Returns a wrapped object. Calling methods on this object will continue to return wrapped objects - * until value() is used. - * @param obj Object to chain. - * @return Wrapped `obj`. - **/ - chain(obj: T[]): _Chain; - chain(obj: _.Dictionary): _Chain; - chain(obj: T): _Chain; -} + /** + * Returns a random integer between min and max, inclusive. If you only pass one argument, + * it will return a number between 0 and that number. + * @param max The maximum random number. + * @return A random number between 0 and `max`. + **/ + random(max: number): number; -interface Underscore { + /** + * @see _.random + * @param min The minimum random number. + * @return A random number between `min` and `max`. + **/ + random(min: number, max: number): number; - /* ************* - * Collections * - ************* */ + /** + * Allows you to extend Underscore with your own utility functions. Pass a hash of + * {name: function} definitions to have your functions added to the Underscore object, + * as well as the OOP wrapper. + * @param object Mixin object containing key/function pairs to add to the Underscore object. + **/ + mixin(object: any): void; - /** - * Wrapped type `any[]`. - * @see _.each - **/ - each(iterator: _.ListIterator, context?: any): T[]; + /** + * A mostly-internal function to generate callbacks that can be applied to each element + * in a collection, returning the desired result -- either identity, an arbitrary callback, + * a property matcher, or a propetery accessor. + * @param string|Function|Object value The value to iterate over, usually the key. + * @param any context + * @return Callback that can be applied to each element in a collection. + **/ + iteratee(value: string): Function; + iteratee(value: Function, context?: any): Function; + iteratee(value: Object): Function; - /** - * @see _.each - **/ - each(iterator: _.ObjectIterator, context?: any): T[]; + /** + * Generate a globally-unique id for client-side models or DOM elements that need one. + * If prefix is passed, the id will be appended to it. Without prefix, returns an integer. + * @param prefix A prefix string to start the unique ID with. + * @return Unique string ID beginning with `prefix`. + **/ + uniqueId(prefix?: string): string; - /** - * @see _.each - **/ - forEach(iterator: _.ListIterator, context?: any): T[]; + /** + * Escapes a string for insertion into HTML, replacing &, <, >, ", ', and / characters. + * @param str Raw string to escape. + * @return `str` HTML escaped. + **/ + escape(str: string): string; - /** - * @see _.each - **/ - forEach(iterator: _.ObjectIterator, context?: any): T[]; + /** + * The opposite of escape, replaces &, <, >, ", and ' with their unescaped counterparts. + * @param str HTML escaped string. + * @return `str` Raw string. + **/ + unescape(str: string): string; - /** - * Wrapped type `any[]`. - * @see _.map - **/ - map(iterator: _.ListIterator, context?: any): TResult[]; + /** + * If the value of the named property is a function then invoke it; otherwise, return it. + * @param object Object to maybe invoke function `property` on. + * @param property The function by name to invoke on `object`. + * @param defaultValue The value to be returned in case `property` doesn't exist or is undefined. + * @return The result of invoking the function `property` on `object. + **/ + result(object: any, property: string, defaultValue?: any): any; - /** - * Wrapped type `any[]`. - * @see _.map - **/ - map(iterator: _.ObjectIterator, context?: any): TResult[]; + /** + * Compiles JavaScript templates into functions that can be evaluated for rendering. Useful + * for rendering complicated bits of HTML from JSON data sources. Template functions can both + * interpolate variables, using <%= ... %>, as well as execute arbitrary JavaScript code, with + * <% ... %>. If you wish to interpolate a value, and have it be HTML-escaped, use <%- ... %> When + * you evaluate a template function, pass in a data object that has properties corresponding to + * the template's free variables. If you're writing a one-off, you can pass the data object as + * the second parameter to template in order to render immediately instead of returning a template + * function. The settings argument should be a hash containing any _.templateSettings that should + * be overridden. + * @param templateString Underscore HTML template. + * @param data Data to use when compiling `templateString`. + * @param settings Settings to use while compiling. + * @return Returns the compiled Underscore HTML template. + **/ + template(templateString: string, settings?: _.TemplateSettings): (...data: any[]) => string; - /** - * @see _.map - **/ - collect(iterator: _.ListIterator, context?: any): TResult[]; + /** + * By default, Underscore uses ERB-style template delimiters, change the + * following template settings to use alternative delimiters. + **/ + templateSettings: _.TemplateSettings; - /** - * @see _.map - **/ - collect(iterator: _.ObjectIterator, context?: any): TResult[]; + /** + * Returns an integer timestamp for the current time, using the fastest method available in the runtime. Useful for implementing timing/animation functions. + **/ + now(): number; - /** - * Wrapped type `any[]`. - * @see _.reduce - **/ - reduce(iterator: _.MemoIterator, memo?: TResult, context?: any): TResult; + /* ********** + * Chaining * + *********** */ - /** - * @see _.reduce - **/ - inject(iterator: _.MemoIterator, memo?: TResult, context?: any): TResult; + /** + * Returns a wrapped object. Calling methods on this object will continue to return wrapped objects + * until value() is used. + * @param obj Object to chain. + * @return Wrapped `obj`. + **/ + chain(obj: T[]): _Chain; + chain(obj: _.Dictionary): _Chain; + chain(obj: T): _Chain; + } - /** - * @see _.reduce - **/ - foldl(iterator: _.MemoIterator, memo?: TResult, context?: any): TResult; + interface Underscore { - /** - * Wrapped type `any[]`. - * @see _.reduceRight - **/ - reduceRight(iterator: _.MemoIterator, memo?: TResult, context?: any): TResult; + /* ************* + * Collections * + ************* */ - /** - * @see _.reduceRight - **/ - foldr(iterator: _.MemoIterator, memo?: TResult, context?: any): TResult; + /** + * Wrapped type `any[]`. + * @see _.each + **/ + each(iterator: _.ListIterator, context?: any): _.List; - /** - * Wrapped type `any[]`. - * @see _.find - **/ - find(iterator: _.ListIterator|_.ObjectIterator, context?: any): T; + /** + * @see _.each + **/ + each(iterator: _.ObjectIterator, context?: any): _.List; - /** - * @see _.find - **/ - find(interator: U): T; + /** + * @see _.each + **/ + forEach(iterator: _.ListIterator, context?: any): _.List; - /** - * @see _.find - **/ - find(interator: string): T; + /** + * @see _.each + **/ + forEach(iterator: _.ObjectIterator, context?: any): _.List; - /** - * @see _.find - **/ - detect(iterator: _.ListIterator|_.ObjectIterator, context?: any): T; + /** + * Wrapped type `any[]`. + * @see _.map + **/ + map(iterator: _.ListIterator, context?: any): TResult[]; - /** - * @see _.find - **/ - detect(interator?: U): T; + /** + * Wrapped type `any[]`. + * @see _.map + **/ + map(iterator: _.ObjectIterator, context?: any): TResult[]; - /** - * @see _.find - **/ - detect(interator?: string): T; + /** + * @see _.map + **/ + collect(iterator: _.ListIterator, context?: any): TResult[]; - /** - * Wrapped type `any[]`. - * @see _.filter - **/ - filter(iterator: _.ListIterator, context?: any): T[]; + /** + * @see _.map + **/ + collect(iterator: _.ObjectIterator, context?: any): TResult[]; - /** - * @see _.filter - **/ - select(iterator: _.ListIterator, context?: any): T[]; + /** + * Wrapped type `any[]`. + * @see _.reduce + **/ + reduce(iterator: _.MemoIterator, memo?: TResult, context?: any): TResult; - /** - * Wrapped type `any[]`. - * @see _.where - **/ - where(properties: U): T[]; + /** + * @see _.reduce + **/ + inject(iterator: _.MemoIterator, memo?: TResult, context?: any): TResult; - /** - * Wrapped type `any[]`. - * @see _.findWhere - **/ - findWhere(properties: U): T; + /** + * @see _.reduce + **/ + foldl(iterator: _.MemoIterator, memo?: TResult, context?: any): TResult; - /** - * Wrapped type `any[]`. - * @see _.reject - **/ - reject(iterator: _.ListIterator, context?: any): T[]; + /** + * Wrapped type `any[]`. + * @see _.reduceRight + **/ + reduceRight(iterator: _.MemoIterator, memo?: TResult, context?: any): TResult; - /** - * Wrapped type `any[]`. - * @see _.all - **/ - all(iterator?: _.ListIterator, context?: any): boolean; + /** + * @see _.reduceRight + **/ + foldr(iterator: _.MemoIterator, memo?: TResult, context?: any): TResult; - /** - * @see _.all - **/ - every(iterator?: _.ListIterator, context?: any): boolean; + /** + * Wrapped type `any[]`. + * @see _.find + **/ + find(iterator: _.ListIterator | _.ObjectIterator, context?: any): T | undefined; - /** - * Wrapped type `any[]`. - * @see _.any - **/ - any(iterator?: _.ListIterator, context?: any): boolean; + /** + * @see _.find + **/ + find(interator: U): T | undefined; - /** - * @see _.any - **/ - some(iterator?: _.ListIterator, context?: any): boolean; + /** + * @see _.find + **/ + find(interator: string): T | undefined; - /** - * Wrapped type `any[]`. - * @see _.contains - **/ - contains(value: T): boolean; + /** + * @see _.find + **/ + detect(iterator: _.ListIterator | _.ObjectIterator, context?: any): T | undefined; - /** - * Alias for 'contains'. - * @see contains - **/ - include(value: T): boolean; + /** + * @see _.find + **/ + detect(interator?: U): T | undefined; - /** - * Wrapped type `any[]`. - * @see _.invoke - **/ - invoke(methodName: string, ...arguments: any[]): any; + /** + * @see _.find + **/ + detect(interator?: string): T | undefined; - /** - * Wrapped type `any[]`. - * @see _.pluck - **/ - pluck(propertyName: string): any[]; + /** + * Wrapped type `any[]`. + * @see _.filter + **/ + filter(iterator: _.ListIterator, context?: any): T[]; - /** - * Wrapped type `number[]`. - * @see _.max - **/ - max(): number; + /** + * @see _.filter + **/ + select(iterator: _.ListIterator, context?: any): T[]; - /** - * Wrapped type `any[]`. - * @see _.max - **/ - max(iterator: _.ListIterator, context?: any): T; + /** + * Wrapped type `any[]`. + * @see _.where + **/ + where(properties: U): T[]; - /** - * Wrapped type `any[]`. - * @see _.max - **/ - max(iterator?: _.ListIterator, context?: any): T; + /** + * Wrapped type `any[]`. + * @see _.findWhere + **/ + findWhere(properties: U): T | undefined; - /** - * Wrapped type `number[]`. - * @see _.min - **/ - min(): number; + /** + * Wrapped type `any[]`. + * @see _.reject + **/ + reject(iterator: _.ListIterator, context?: any): T[]; - /** - * Wrapped type `any[]`. - * @see _.min - **/ - min(iterator: _.ListIterator, context?: any): T; + /** + * Wrapped type `any[]`. + * @see _.all + **/ + all(iterator?: _.ListIterator, context?: any): boolean; - /** - * Wrapped type `any[]`. - * @see _.min - **/ - min(iterator?: _.ListIterator, context?: any): T; + /** + * @see _.all + **/ + every(iterator?: _.ListIterator, context?: any): boolean; - /** - * Wrapped type `any[]`. - * @see _.sortBy - **/ - sortBy(iterator?: _.ListIterator, context?: any): T[]; + /** + * Wrapped type `any[]`. + * @see _.any + **/ + any(iterator?: _.ListIterator, context?: any): boolean; - /** - * Wrapped type `any[]`. - * @see _.sortBy - **/ - sortBy(iterator: string, context?: any): T[]; + /** + * @see _.any + **/ + some(iterator?: _.ListIterator, context?: any): boolean; - /** - * Wrapped type `any[]`. - * @see _.groupBy - **/ - groupBy(iterator?: _.ListIterator, context?: any): _.Dictionary<_.List>; + /** + * Wrapped type `any[]`. + * @see _.contains + **/ + contains(value: T, fromIndex?: number): boolean; - /** - * Wrapped type `any[]`. - * @see _.groupBy - **/ - groupBy(iterator: string, context?: any): _.Dictionary; + /** + * Alias for 'contains'. + * @see contains + **/ + include(value: T, fromIndex?: number): boolean; - /** - * Wrapped type `any[]`. - * @see _.indexBy - **/ - indexBy(iterator: _.ListIterator, context?: any): _.Dictionary; + /** + * Alias for 'contains'. + * @see contains + **/ + includes(value: T, fromIndex?: number): boolean; - /** - * Wrapped type `any[]`. - * @see _.indexBy - **/ - indexBy(iterator: string, context?: any): _.Dictionary; + /** + * Wrapped type `any[]`. + * @see _.invoke + **/ + invoke(methodName: string, ...args: any[]): any; - /** - * Wrapped type `any[]`. - * @see _.countBy - **/ - countBy(iterator?: _.ListIterator, context?: any): _.Dictionary; + /** + * Wrapped type `any[]`. + * @see _.pluck + **/ + pluck(propertyName: string): any[]; - /** - * Wrapped type `any[]`. - * @see _.countBy - **/ - countBy(iterator: string, context?: any): _.Dictionary; + /** + * Wrapped type `number[]`. + * @see _.max + **/ + max(): number; - /** - * Wrapped type `any[]`. - * @see _.shuffle - **/ - shuffle(): T[]; + /** + * Wrapped type `any[]`. + * @see _.max + **/ + max(iterator: _.ListIterator, context?: any): T; - /** - * Wrapped type `any[]`. - * @see _.sample - **/ - sample(n: number): T[]; + /** + * Wrapped type `any[]`. + * @see _.max + **/ + max(iterator?: _.ListIterator, context?: any): T; - /** - * @see _.sample - **/ - sample(): T; + /** + * Wrapped type `number[]`. + * @see _.min + **/ + min(): number; - /** - * Wrapped type `any`. - * @see _.toArray - **/ - toArray(): T[]; + /** + * Wrapped type `any[]`. + * @see _.min + **/ + min(iterator: _.ListIterator, context?: any): T; - /** - * Wrapped type `any`. - * @see _.size - **/ - size(): number; + /** + * Wrapped type `any[]`. + * @see _.min + **/ + min(iterator?: _.ListIterator, context?: any): T; - /********* - * Arrays * - **********/ + /** + * Wrapped type `any[]`. + * @see _.sortBy + **/ + sortBy(iterator?: _.ListIterator, context?: any): T[]; - /** - * Wrapped type `any[]`. - * @see _.first - **/ - first(): T; + /** + * Wrapped type `any[]`. + * @see _.sortBy + **/ + sortBy(iterator: string, context?: any): T[]; - /** - * Wrapped type `any[]`. - * @see _.first - **/ - first(n: number): T[]; + /** + * Wrapped type `any[]`. + * @see _.groupBy + **/ + groupBy(iterator?: _.ListIterator, context?: any): _.Dictionary<_.List>; - /** - * @see _.first - **/ - head(): T; + /** + * Wrapped type `any[]`. + * @see _.groupBy + **/ + groupBy(iterator: string, context?: any): _.Dictionary; - /** - * @see _.first - **/ - head(n: number): T[]; + /** + * Wrapped type `any[]`. + * @see _.indexBy + **/ + indexBy(iterator: _.ListIterator, context?: any): _.Dictionary; - /** - * @see _.first - **/ - take(): T; + /** + * Wrapped type `any[]`. + * @see _.indexBy + **/ + indexBy(iterator: string, context?: any): _.Dictionary; - /** - * @see _.first - **/ - take(n: number): T[]; + /** + * Wrapped type `any[]`. + * @see _.countBy + **/ + countBy(iterator?: _.ListIterator, context?: any): _.Dictionary; - /** - * Wrapped type `any[]`. - * @see _.initial - **/ - initial(n?: number): T[]; + /** + * Wrapped type `any[]`. + * @see _.countBy + **/ + countBy(iterator: string, context?: any): _.Dictionary; - /** - * Wrapped type `any[]`. - * @see _.last - **/ - last(): T; + /** + * Wrapped type `any[]`. + * @see _.shuffle + **/ + shuffle(): T[]; - /** - * Wrapped type `any[]`. - * @see _.last - **/ - last(n: number): T[]; + /** + * Wrapped type `any[]`. + * @see _.sample + **/ + sample(n: number): T[]; - /** - * Wrapped type `any[]`. - * @see _.rest - **/ - rest(n?: number): T[]; + /** + * @see _.sample + **/ + sample(): T; - /** - * @see _.rest - **/ - tail(n?: number): T[]; + /** + * Wrapped type `any`. + * @see _.toArray + **/ + toArray(): T[]; - /** - * @see _.rest - **/ - drop(n?: number): T[]; + /** + * Wrapped type `any`. + * @see _.size + **/ + size(): number; - /** - * Wrapped type `any[]`. - * @see _.compact - **/ - compact(): T[]; + /********* + * Arrays * + **********/ - /** - * Wrapped type `any`. - * @see _.flatten - **/ - flatten(shallow?: boolean): any[]; + /** + * Wrapped type `any[]`. + * @see _.first + **/ + first(): T | undefined; - /** - * Wrapped type `any[]`. - * @see _.without - **/ - without(...values: T[]): T[]; + /** + * Wrapped type `any[]`. + * @see _.first + **/ + first(n: number): T[]; - /** - * Wrapped type `any[]`. - * @see _.partition - **/ - partition(iterator: _.ListIterator, context?: any): T[][]; + /** + * @see _.first + **/ + head(): T | undefined; - /** - * Wrapped type `any[][]`. - * @see _.union - **/ - union(...arrays: _.List[]): T[]; + /** + * @see _.first + **/ + head(n: number): T[]; - /** - * Wrapped type `any[][]`. - * @see _.intersection - **/ - intersection(...arrays: _.List[]): T[]; + /** + * @see _.first + **/ + take(): T; - /** - * Wrapped type `any[]`. - * @see _.difference - **/ - difference(...others: _.List[]): T[]; + /** + * @see _.first + **/ + take(n: number): T[]; - /** - * Wrapped type `any[]`. - * @see _.uniq - **/ - uniq(isSorted?: boolean, iterator?: _.ListIterator): T[]; + /** + * Wrapped type `any[]`. + * @see _.initial + **/ + initial(n?: number): T[]; - /** - * Wrapped type `any[]`. - * @see _.uniq - **/ - uniq(iterator?: _.ListIterator, context?: any): T[]; + /** + * Wrapped type `any[]`. + * @see _.last + **/ + last(): T | undefined; - /** - * @see _.uniq - **/ - unique(isSorted?: boolean, iterator?: _.ListIterator): T[]; + /** + * Wrapped type `any[]`. + * @see _.last + **/ + last(n: number): T[]; - /** - * @see _.uniq - **/ - unique(iterator?: _.ListIterator, context?: any): T[]; + /** + * Wrapped type `any[]`. + * @see _.rest + **/ + rest(n?: number): T[]; - /** - * Wrapped type `any[][]`. - * @see _.zip - **/ - zip(...arrays: any[][]): any[][]; + /** + * @see _.rest + **/ + tail(n?: number): T[]; - /** - * Wrapped type `any[][]`. - * @see _.unzip - **/ - unzip(...arrays: any[][]): any[][]; + /** + * @see _.rest + **/ + drop(n?: number): T[]; - /** - * Wrapped type `any[][]`. - * @see _.object - **/ - object(...keyValuePairs: any[][]): any; + /** + * Wrapped type `any[]`. + * @see _.compact + **/ + compact(): T[]; - /** - * @see _.object - **/ - object(values?: any): any; + /** + * Wrapped type `any`. + * @see _.flatten + **/ + flatten(shallow?: boolean): any[]; - /** - * Wrapped type `any[]`. - * @see _.indexOf - **/ - indexOf(value: T, isSorted?: boolean): number; + /** + * Wrapped type `any[]`. + * @see _.without + **/ + without(...values: T[]): T[]; - /** - * @see _.indexOf - **/ - indexOf(value: T, startFrom: number): number; + /** + * Wrapped type `any[]`. + * @see _.partition + **/ + partition(iterator: _.ListIterator, context?: any): T[][]; - /** - * Wrapped type `any[]`. - * @see _.lastIndexOf - **/ - lastIndexOf(value: T, from?: number): number; + /** + * Wrapped type `any[][]`. + * @see _.union + **/ + union(...arrays: _.List[]): T[]; - /** - * @see _.findIndex - **/ - findIndex(array: _.List, predicate: _.ListIterator | {}, context?: any): number; + /** + * Wrapped type `any[][]`. + * @see _.intersection + **/ + intersection(...arrays: _.List[]): T[]; - /** - * @see _.findLastIndex - **/ - findLastIndex(array: _.List, predicate: _.ListIterator | {}, context?: any): number; + /** + * Wrapped type `any[]`. + * @see _.difference + **/ + difference(...others: _.List[]): T[]; - /** - * Wrapped type `any[]`. - * @see _.sortedIndex - **/ - sortedIndex(value: T, iterator?: (x: T) => any, context?: any): number; + /** + * Wrapped type `any[]`. + * @see _.uniq + **/ + uniq(isSorted?: boolean, iterator?: _.ListIterator | _.IterateePropertyShorthand): T[]; - /** - * Wrapped type `number`. - * @see _.range - **/ - range(stop: number, step?: number): number[]; + /** + * Wrapped type `any[]`. + * @see _.uniq + **/ + uniq(iterator?: _.ListIterator, context?: any): T[]; - /** - * Wrapped type `number`. - * @see _.range - **/ - range(): number[]; + /** + * @see _.uniq + **/ + unique(isSorted?: boolean, iterator?: _.ListIterator): T[]; - /* *********** - * Functions * - ************ */ + /** + * @see _.uniq + **/ + unique(iterator?: _.ListIterator, context?: any): T[]; - /** - * Wrapped type `Function`. - * @see _.bind - **/ - bind(object: any, ...arguments: any[]): Function; + /** + * Wrapped type `any[][]`. + * @see _.zip + **/ + zip(...arrays: any[][]): any[][]; - /** - * Wrapped type `object`. - * @see _.bindAll - **/ - bindAll(...methodNames: string[]): any; + /** + * Wrapped type `any[][]`. + * @see _.unzip + **/ + unzip(...arrays: any[][]): any[][]; - /** - * Wrapped type `Function`. - * @see _.partial - **/ - partial(...arguments: any[]): Function; + /** + * Wrapped type `any[][]`. + * @see _.object + **/ + object(...keyValuePairs: any[][]): any; - /** - * Wrapped type `Function`. - * @see _.memoize - **/ - memoize(hashFn?: (n: any) => string): Function; + /** + * @see _.object + **/ + object(values?: any): any; - /** - * Wrapped type `Function`. - * @see _.defer - **/ - defer(...arguments: any[]): void; + /** + * Wrapped type `any[]`. + * @see _.indexOf + **/ + indexOf(value: T, isSorted?: boolean): number; - /** - * Wrapped type `Function`. - * @see _.delay - **/ - delay(wait: number, ...arguments: any[]): any; + /** + * @see _.indexOf + **/ + indexOf(value: T, startFrom: number): number; - /** - * @see _.delay - **/ - delay(...arguments: any[]): any; + /** + * Wrapped type `any[]`. + * @see _.lastIndexOf + **/ + lastIndexOf(value: T, from?: number): number; - /** - * Wrapped type `Function`. - * @see _.throttle - **/ - throttle(wait: number, options?: _.ThrottleSettings): Function; + /** + * @see _.findIndex + **/ + findIndex(array: _.List, predicate: _.ListIterator | {}, context?: any): number; - /** - * Wrapped type `Function`. - * @see _.debounce - **/ - debounce(wait: number, immediate?: boolean): Function; + /** + * @see _.findLastIndex + **/ + findLastIndex(array: _.List, predicate: _.ListIterator | {}, context?: any): number; - /** - * Wrapped type `Function`. - * @see _.once - **/ - once(): Function; + /** + * Wrapped type `any[]`. + * @see _.sortedIndex + **/ + sortedIndex(value: T, iterator?: (x: T) => any, context?: any): number; - /** - * Wrapped type `number`. - * @see _.after - **/ - after(fn: Function): Function; + /** + * Wrapped type `number`. + * @see _.range + **/ + range(stop: number, step?: number): number[]; - /** - * Wrapped type `number`. - * @see _.before - **/ - before(fn: Function): Function; + /** + * Wrapped type `number`. + * @see _.range + **/ + range(): number[]; - /** - * Wrapped type `Function`. - * @see _.wrap - **/ - wrap(wrapper: Function): () => Function; + /** + * Wrapped type any[][]. + * @see _.chunk + **/ + chunk(): any[][]; - /** - * Wrapped type `Function`. - * @see _.negate - **/ - negate(): boolean; + /* *********** + * Functions * + ************ */ - /** - * Wrapped type `Function[]`. - * @see _.compose - **/ - compose(...functions: Function[]): Function; + /** + * Wrapped type `Function`. + * @see _.bind + **/ + bind(object: any, ...args: any[]): Function; - /********* * - * Objects * - ********** */ + /** + * Wrapped type `object`. + * @see _.bindAll + **/ + bindAll(...methodNames: string[]): any; - /** - * Wrapped type `object`. - * @see _.keys - **/ - keys(): string[]; + /** + * Wrapped type `Function`. + * @see _.partial + **/ + partial(...args: any[]): Function; - /** - * Wrapped type `object`. - * @see _.allKeys - **/ - allKeys(): string[]; + /** + * Wrapped type `Function`. + * @see _.memoize + **/ + memoize(hashFn?: (n: any) => string): Function; - /** - * Wrapped type `object`. - * @see _.values - **/ - values(): T[]; + /** + * Wrapped type `Function`. + * @see _.defer + **/ + defer(...args: any[]): void; - /** - * Wrapped type `object`. - * @see _.pairs - **/ - pairs(): any[][]; + /** + * Wrapped type `Function`. + * @see _.delay + **/ + delay(wait: number, ...args: any[]): any; - /** - * Wrapped type `object`. - * @see _.invert - **/ - invert(): any; + /** + * @see _.delay + **/ + delay(...args: any[]): any; - /** - * Wrapped type `object`. - * @see _.functions - **/ - functions(): string[]; + /** + * Wrapped type `Function`. + * @see _.throttle + **/ + throttle(wait: number, options?: _.ThrottleSettings): Function & _.Cancelable; - /** - * @see _.functions - **/ - methods(): string[]; + /** + * Wrapped type `Function`. + * @see _.debounce + **/ + debounce(wait: number, immediate?: boolean): Function & _.Cancelable; - /** - * Wrapped type `object`. - * @see _.extend - **/ - extend(...sources: any[]): any; + /** + * Wrapped type `Function`. + * @see _.once + **/ + once(): Function; - /** - * Wrapped type `object`. - * @see _.pick - **/ - pick(...keys: any[]): any; - pick(keys: any[]): any; - pick(fn: (value: any, key: any, object: any) => any): any; + /** + * Wrapped type `Function`. + * @see _.once + **/ + restArgs(starIndex?: number): Function; - /** - * Wrapped type `object`. - * @see _.omit - **/ - omit(...keys: string[]): any; - omit(keys: string[]): any; - omit(fn: Function): any; + /** + * Wrapped type `number`. + * @see _.after + **/ + after(fn: Function): Function; - /** - * Wrapped type `object`. - * @see _.defaults - **/ - defaults(...defaults: any[]): any; + /** + * Wrapped type `number`. + * @see _.before + **/ + before(fn: Function): Function; - /** - * Wrapped type `any[]`. - * @see _.clone - **/ - clone(): T; + /** + * Wrapped type `Function`. + * @see _.wrap + **/ + wrap(wrapper: Function): () => Function; - /** - * Wrapped type `object`. - * @see _.tap - **/ - tap(interceptor: (...as: any[]) => any): any; + /** + * Wrapped type `Function`. + * @see _.negate + **/ + negate(): (...args: any[]) => boolean; - /** - * Wrapped type `object`. - * @see _.has - **/ - has(key: string): boolean; + /** + * Wrapped type `Function[]`. + * @see _.compose + **/ + compose(...functions: Function[]): Function; - /** - * Wrapped type `any[]`. - * @see _.matches - **/ - matches(): _.ListIterator; + /********* * + * Objects * + ********** */ - /** - * Wrapped type `string`. - * @see _.property - **/ - property(): (object: Object) => any; + /** + * Wrapped type `object`. + * @see _.keys + **/ + keys(): string[]; - /** - * Wrapped type `object`. - * @see _.propertyOf - **/ - propertyOf(): (key: string) => any; + /** + * Wrapped type `object`. + * @see _.allKeys + **/ + allKeys(): string[]; - /** - * Wrapped type `object`. - * @see _.isEqual - **/ - isEqual(other: any): boolean; + /** + * Wrapped type `object`. + * @see _.values + **/ + values(): T[]; - /** - * Wrapped type `object`. - * @see _.isEmpty - **/ - isEmpty(): boolean; + /** + * Wrapped type `object`. + * @see _.pairs + **/ + pairs(): any[][]; - /** - * Wrapped type `object`. - * @see _.isMatch - **/ - isMatch(): boolean; + /** + * Wrapped type `object`. + * @see _.invert + **/ + invert(): any; - /** - * Wrapped type `object`. - * @see _.isElement - **/ - isElement(): boolean; + /** + * Wrapped type `object`. + * @see _.functions + **/ + functions(): string[]; - /** - * Wrapped type `object`. - * @see _.isArray - **/ - isArray(): boolean; + /** + * @see _.functions + **/ + methods(): string[]; - /** - * Wrapped type `object`. - * @see _.isObject - **/ - isObject(): boolean; + /** + * Wrapped type `object`. + * @see _.extend + **/ + extend(...sources: any[]): any; - /** - * Wrapped type `object`. - * @see _.isArguments - **/ - isArguments(): boolean; + /** + * Wrapped type `object`. + * @see _.extend + **/ + findKey(predicate: _.ObjectIterator, context?: any): any - /** - * Wrapped type `object`. - * @see _.isFunction - **/ - isFunction(): boolean; + /** + * Wrapped type `object`. + * @see _.pick + **/ + pick(...keys: any[]): any; + pick(keys: any[]): any; + pick(fn: (value: any, key: any, object: any) => any): any; + + /** + * Wrapped type `object`. + * @see _.omit + **/ + omit(...keys: string[]): any; + omit(keys: string[]): any; + omit(fn: Function): any; + + /** + * Wrapped type `object`. + * @see _.defaults + **/ + defaults(...defaults: any[]): any; + + /** + * Wrapped type `any`. + * @see _.create + **/ + create(props?: Object): any; + + /** + * Wrapped type `any[]`. + * @see _.clone + **/ + clone(): T; + + /** + * Wrapped type `object`. + * @see _.tap + **/ + tap(interceptor: (...as: any[]) => any): any; + + /** + * Wrapped type `object`. + * @see _.has + **/ + has(key: string): boolean; + + /** + * Wrapped type `any[]`. + * @see _.matches + **/ + matches(): _.ListIterator; + + /** + * Wrapped type `any[]`. + * @see _.matcher + **/ + matcher(): _.ListIterator; + + /** + * Wrapped type `string`. + * @see _.property + **/ + property(): (object: Object) => any; + + /** + * Wrapped type `object`. + * @see _.propertyOf + **/ + propertyOf(): (key: string) => any; + + /** + * Wrapped type `object`. + * @see _.isEqual + **/ + isEqual(other: any): boolean; + + /** + * Wrapped type `object`. + * @see _.isEmpty + **/ + isEmpty(): boolean; + + /** + * Wrapped type `object`. + * @see _.isMatch + **/ + isMatch(): boolean; + + /** + * Wrapped type `object`. + * @see _.isElement + **/ + isElement(): boolean; + + /** + * Wrapped type `object`. + * @see _.isArray + **/ + isArray(): boolean; + + /** + * Wrapped type `object`. + * @see _.isSymbol + **/ + isSymbol(): boolean; + + /** + * Wrapped type `object`. + * @see _.isObject + **/ + isObject(): boolean; + + /** + * Wrapped type `object`. + * @see _.isArguments + **/ + isArguments(): boolean; + + /** + * Wrapped type `object`. + * @see _.isFunction + **/ + isFunction(): boolean; + + /** + * Wrapped type `object`. + * @see _.isError + **/ + isError(): boolean; + + /** + * Wrapped type `object`. + * @see _.isString + **/ + isString(): boolean; + + /** + * Wrapped type `object`. + * @see _.isNumber + **/ + isNumber(): boolean; + + /** + * Wrapped type `object`. + * @see _.isFinite + **/ + isFinite(): boolean; + + /** + * Wrapped type `object`. + * @see _.isBoolean + **/ + isBoolean(): boolean; - /** - * Wrapped type `object`. - * @see _.isError - **/ - isError(): boolean; + /** + * Wrapped type `object`. + * @see _.isDate + **/ + isDate(): boolean; - /** - * Wrapped type `object`. - * @see _.isString - **/ - isString(): boolean; + /** + * Wrapped type `object`. + * @see _.isRegExp + **/ + isRegExp(): boolean; - /** - * Wrapped type `object`. - * @see _.isNumber - **/ - isNumber(): boolean; + /** + * Wrapped type `object`. + * @see _.isNaN + **/ + isNaN(): boolean; - /** - * Wrapped type `object`. - * @see _.isFinite - **/ - isFinite(): boolean; + /** + * Wrapped type `object`. + * @see _.isNull + **/ + isNull(): boolean; - /** - * Wrapped type `object`. - * @see _.isBoolean - **/ - isBoolean(): boolean; + /** + * Wrapped type `object`. + * @see _.isUndefined + **/ + isUndefined(): boolean; - /** - * Wrapped type `object`. - * @see _.isDate - **/ - isDate(): boolean; + /********* * + * Utility * + ********** */ - /** - * Wrapped type `object`. - * @see _.isRegExp - **/ - isRegExp(): boolean; + /** + * Wrapped type `any`. + * @see _.identity + **/ + identity(): any; - /** - * Wrapped type `object`. - * @see _.isNaN - **/ - isNaN(): boolean; + /** + * Wrapped type `any`. + * @see _.constant + **/ + constant(): () => T; - /** - * Wrapped type `object`. - * @see _.isNull - **/ - isNull(): boolean; + /** + * Wrapped type `any`. + * @see _.noop + **/ + noop(): void; - /** - * Wrapped type `object`. - * @see _.isUndefined - **/ - isUndefined(): boolean; + /** + * Wrapped type `number`. + * @see _.times + **/ + times(iterator: (n: number) => TResult, context?: any): TResult[]; - /********* * - * Utility * - ********** */ + /** + * Wrapped type `number`. + * @see _.random + **/ + random(): number; + /** + * Wrapped type `number`. + * @see _.random + **/ + random(max: number): number; - /** - * Wrapped type `any`. - * @see _.identity - **/ - identity(): any; + /** + * Wrapped type `object`. + * @see _.mixin + **/ + mixin(): void; - /** - * Wrapped type `any`. - * @see _.constant - **/ - constant(): () => T; + /** + * Wrapped type `string|Function|Object`. + * @see _.iteratee + **/ + iteratee(context?: any): Function; - /** - * Wrapped type `any`. - * @see _.noop - **/ - noop(): void; + /** + * Wrapped type `string`. + * @see _.uniqueId + **/ + uniqueId(): string; - /** - * Wrapped type `number`. - * @see _.times - **/ - times(iterator: (n: number) => TResult, context?: any): TResult[]; + /** + * Wrapped type `string`. + * @see _.escape + **/ + escape(): string; - /** - * Wrapped type `number`. - * @see _.random - **/ - random(): number; - /** - * Wrapped type `number`. - * @see _.random - **/ - random(max: number): number; + /** + * Wrapped type `string`. + * @see _.unescape + **/ + unescape(): string; - /** - * Wrapped type `object`. - * @see _.mixin - **/ - mixin(): void; + /** + * Wrapped type `object`. + * @see _.result + **/ + result(property: string, defaultValue?: any): any; - /** - * Wrapped type `string|Function|Object`. - * @see _.iteratee - **/ - iteratee(context?: any, argCount?: number): Function; + /** + * Wrapped type `string`. + * @see _.template + **/ + template(settings?: _.TemplateSettings): (...data: any[]) => string; - /** - * Wrapped type `string`. - * @see _.uniqueId - **/ - uniqueId(): string; + /********** * + * Chaining * + *********** */ - /** - * Wrapped type `string`. - * @see _.escape - **/ - escape(): string; + /** + * Wrapped type `any`. + * @see _.chain + **/ + chain(): _Chain; - /** - * Wrapped type `string`. - * @see _.unescape - **/ - unescape(): string; + /** + * Wrapped type `any`. + * Extracts the value of a wrapped object. + * @return Value of the wrapped object. + **/ + value(): TResult; + } - /** - * Wrapped type `object`. - * @see _.result - **/ - result(property: string, defaultValue?:any): any; + interface _Chain { - /** - * Wrapped type `string`. - * @see _.template - **/ - template(settings?: _.TemplateSettings): (...data: any[]) => string; + /* ************* + * Collections * + ************* */ - /********** * - * Chaining * - *********** */ + /** + * Wrapped type `any[]`. + * @see _.each + **/ + each(iterator: _.ListIterator, context?: any): _Chain; - /** - * Wrapped type `any`. - * @see _.chain - **/ - chain(): _Chain; + /** + * @see _.each + **/ + each(iterator: _.ObjectIterator, context?: any): _Chain; - /** - * Wrapped type `any`. - * Extracts the value of a wrapped object. - * @return Value of the wrapped object. - **/ - value(): TResult; -} + /** + * @see _.each + **/ + forEach(iterator: _.ListIterator, context?: any): _Chain; -interface _Chain { + /** + * @see _.each + **/ + forEach(iterator: _.ObjectIterator, context?: any): _Chain; - /* ************* - * Collections * - ************* */ + /** + * Wrapped type `any[]`. + * @see _.map + **/ + map(iterator: _.ListIterator, context?: any): _ChainOfArrays; - /** - * Wrapped type `any[]`. - * @see _.each - **/ - each(iterator: _.ListIterator, context?: any): _Chain; + /** + * Wrapped type `any[]`. + * @see _.map + **/ + map(iterator: _.ListIterator, context?: any): _Chain; - /** - * @see _.each - **/ - each(iterator: _.ObjectIterator, context?: any): _Chain; + /** + * Wrapped type `any[]`. + * @see _.map + **/ + map(iterator: _.ObjectIterator, context?: any): _ChainOfArrays; - /** - * @see _.each - **/ - forEach(iterator: _.ListIterator, context?: any): _Chain; + /** + * Wrapped type `any[]`. + * @see _.map + **/ + map(iterator: _.ObjectIterator, context?: any): _Chain; - /** - * @see _.each - **/ - forEach(iterator: _.ObjectIterator, context?: any): _Chain; + /** + * @see _.map + **/ + collect(iterator: _.ListIterator, context?: any): _Chain; - /** - * Wrapped type `any[]`. - * @see _.map - **/ - map(iterator: _.ListIterator, context?: any): _ChainOfArrays; + /** + * @see _.map + **/ + collect(iterator: _.ObjectIterator, context?: any): _Chain; - /** - * Wrapped type `any[]`. - * @see _.map - **/ - map(iterator: _.ListIterator, context?: any): _Chain; + /** + * Wrapped type `any[]`. + * @see _.reduce + **/ + reduce(iterator: _.MemoIterator, memo?: TResult, context?: any): _ChainSingle; - /** - * Wrapped type `any[]`. - * @see _.map - **/ - map(iterator: _.ObjectIterator, context?: any): _ChainOfArrays; + /** + * @see _.reduce + **/ + inject(iterator: _.MemoIterator, memo?: TResult, context?: any): _ChainSingle; - /** - * Wrapped type `any[]`. - * @see _.map - **/ - map(iterator: _.ObjectIterator, context?: any): _Chain; + /** + * @see _.reduce + **/ + foldl(iterator: _.MemoIterator, memo?: TResult, context?: any): _ChainSingle; - /** - * @see _.map - **/ - collect(iterator: _.ListIterator, context?: any): _Chain; + /** + * Wrapped type `any[]`. + * @see _.reduceRight + **/ + reduceRight(iterator: _.MemoIterator, memo?: TResult, context?: any): _ChainSingle; - /** - * @see _.map - **/ - collect(iterator: _.ObjectIterator, context?: any): _Chain; + /** + * @see _.reduceRight + **/ + foldr(iterator: _.MemoIterator, memo?: TResult, context?: any): _ChainSingle; - /** - * Wrapped type `any[]`. - * @see _.reduce - **/ - reduce(iterator: _.MemoIterator, memo?: TResult, context?: any): _ChainSingle; + /** + * Wrapped type `any[]`. + * @see _.find + **/ + find(iterator: _.ListIterator | _.ObjectIterator, context?: any): _ChainSingle; - /** - * @see _.reduce - **/ - inject(iterator: _.MemoIterator, memo?: TResult, context?: any): _ChainSingle; + /** + * @see _.find + **/ + find(interator: U): _ChainSingle; - /** - * @see _.reduce - **/ - foldl(iterator: _.MemoIterator, memo?: TResult, context?: any): _ChainSingle; + /** + * @see _.find + **/ + find(interator: string): _ChainSingle; - /** - * Wrapped type `any[]`. - * @see _.reduceRight - **/ - reduceRight(iterator: _.MemoIterator, memo?: TResult, context?: any): _ChainSingle; + /** + * @see _.find + **/ + detect(iterator: _.ListIterator | _.ObjectIterator, context?: any): _ChainSingle; - /** - * @see _.reduceRight - **/ - foldr(iterator: _.MemoIterator, memo?: TResult, context?: any): _ChainSingle; + /** + * @see _.find + **/ + detect(interator: U): _ChainSingle; - /** - * Wrapped type `any[]`. - * @see _.find - **/ - find(iterator: _.ListIterator|_.ObjectIterator, context?: any): _ChainSingle; + /** + * @see _.find + **/ + detect(interator: string): _ChainSingle; - /** - * @see _.find - **/ - find(interator: U): _ChainSingle; + /** + * Wrapped type `any[]`. + * @see _.filter + **/ + filter(iterator: _.ListIterator, context?: any): _Chain; - /** - * @see _.find - **/ - find(interator: string): _ChainSingle; + /** + * @see _.filter + **/ + select(iterator: _.ListIterator, context?: any): _Chain; - /** - * @see _.find - **/ - detect(iterator: _.ListIterator|_.ObjectIterator, context?: any): _ChainSingle; + /** + * Wrapped type `any[]`. + * @see _.where + **/ + where(properties: U): _Chain; - /** - * @see _.find - **/ - detect(interator: U): _ChainSingle; + /** + * Wrapped type `any[]`. + * @see _.findWhere + **/ + findWhere(properties: U): _ChainSingle; - /** - * @see _.find - **/ - detect(interator: string): _ChainSingle; + /** + * Wrapped type `any[]`. + * @see _.reject + **/ + reject(iterator: _.ListIterator, context?: any): _Chain; - /** - * Wrapped type `any[]`. - * @see _.filter - **/ - filter(iterator: _.ListIterator, context?: any): _Chain; + /** + * Wrapped type `any[]`. + * @see _.all + **/ + all(iterator?: _.ListIterator, context?: any): _ChainSingle; - /** - * @see _.filter - **/ - select(iterator: _.ListIterator, context?: any): _Chain; + /** + * @see _.all + **/ + every(iterator?: _.ListIterator, context?: any): _ChainSingle; - /** - * Wrapped type `any[]`. - * @see _.where - **/ - where(properties: U): _Chain; + /** + * Wrapped type `any[]`. + * @see _.any + **/ + any(iterator?: _.ListIterator, context?: any): _ChainSingle; - /** - * Wrapped type `any[]`. - * @see _.findWhere - **/ - findWhere(properties: U): _ChainSingle; + /** + * @see _.any + **/ + some(iterator?: _.ListIterator, context?: any): _ChainSingle; - /** - * Wrapped type `any[]`. - * @see _.reject - **/ - reject(iterator: _.ListIterator, context?: any): _Chain; + /** + * Wrapped type `any[]`. + * @see _.contains + **/ + contains(value: T, fromIndex?: number): _ChainSingle; - /** - * Wrapped type `any[]`. - * @see _.all - **/ - all(iterator?: _.ListIterator, context?: any): _Chain; + /** + * Alias for 'contains'. + * @see contains + **/ + include(value: T, fromIndex?: number): _ChainSingle; - /** - * @see _.all - **/ - every(iterator?: _.ListIterator, context?: any): _ChainSingle; + /** + * Alias for 'contains'. + * @see contains + **/ + includes(value: T, fromIndex?: number): _ChainSingle; - /** - * Wrapped type `any[]`. - * @see _.any - **/ - any(iterator?: _.ListIterator, context?: any): _ChainSingle; + /** + * Wrapped type `any[]`. + * @see _.invoke + **/ + invoke(methodName: string, ...args: any[]): _Chain; - /** - * @see _.any - **/ - some(iterator?: _.ListIterator, context?: any): _ChainSingle; + /** + * Wrapped type `any[]`. + * @see _.pluck + **/ + pluck(propertyName: string): _Chain; - /** - * Wrapped type `any[]`. - * @see _.contains - **/ - contains(value: T): _ChainSingle; + /** + * Wrapped type `number[]`. + * @see _.max + **/ + max(): _ChainSingle; - /** - * Alias for 'contains'. - * @see contains - **/ - include(value: T): _ChainSingle; + /** + * Wrapped type `any[]`. + * @see _.max + **/ + max(iterator: _.ListIterator, context?: any): _ChainSingle; - /** - * Wrapped type `any[]`. - * @see _.invoke - **/ - invoke(methodName: string, ...arguments: any[]): _Chain; + /** + * Wrapped type `any[]`. + * @see _.max + **/ + max(iterator?: _.ListIterator, context?: any): _ChainSingle; - /** - * Wrapped type `any[]`. - * @see _.pluck - **/ - pluck(propertyName: string): _Chain; + /** + * Wrapped type `number[]`. + * @see _.min + **/ + min(): _ChainSingle; - /** - * Wrapped type `number[]`. - * @see _.max - **/ - max(): _ChainSingle; + /** + * Wrapped type `any[]`. + * @see _.min + **/ + min(iterator: _.ListIterator, context?: any): _ChainSingle; - /** - * Wrapped type `any[]`. - * @see _.max - **/ - max(iterator: _.ListIterator, context?: any): _ChainSingle; + /** + * Wrapped type `any[]`. + * @see _.min + **/ + min(iterator?: _.ListIterator, context?: any): _ChainSingle; - /** - * Wrapped type `any[]`. - * @see _.max - **/ - max(iterator?: _.ListIterator, context?: any): _ChainSingle; + /** + * Wrapped type `any[]`. + * @see _.sortBy + **/ + sortBy(iterator?: _.ListIterator, context?: any): _Chain; - /** - * Wrapped type `number[]`. - * @see _.min - **/ - min(): _ChainSingle; + /** + * Wrapped type `any[]`. + * @see _.sortBy + **/ + sortBy(iterator: string, context?: any): _Chain; - /** - * Wrapped type `any[]`. - * @see _.min - **/ - min(iterator: _.ListIterator, context?: any): _ChainSingle; + /** + * Wrapped type `any[]`. + * @see _.groupBy + **/ + groupBy(iterator?: _.ListIterator, context?: any): _ChainOfArrays; - /** - * Wrapped type `any[]`. - * @see _.min - **/ - min(iterator?: _.ListIterator, context?: any): _ChainSingle; + /** + * Wrapped type `any[]`. + * @see _.groupBy + **/ + groupBy(iterator: string, context?: any): _ChainOfArrays; - /** - * Wrapped type `any[]`. - * @see _.sortBy - **/ - sortBy(iterator?: _.ListIterator, context?: any): _Chain; + /** + * Wrapped type `any[]`. + * @see _.indexBy + **/ + indexBy(iterator: _.ListIterator, context?: any): _Chain; - /** - * Wrapped type `any[]`. - * @see _.sortBy - **/ - sortBy(iterator: string, context?: any): _Chain; + /** + * Wrapped type `any[]`. + * @see _.indexBy + **/ + indexBy(iterator: string, context?: any): _Chain; - /** - * Wrapped type `any[]`. - * @see _.groupBy - **/ - groupBy(iterator?: _.ListIterator, context?: any): _ChainOfArrays; + /** + * Wrapped type `any[]`. + * @see _.countBy + **/ + countBy(iterator?: _.ListIterator, context?: any): _Chain; - /** - * Wrapped type `any[]`. - * @see _.groupBy - **/ - groupBy(iterator: string, context?: any): _ChainOfArrays; + /** + * Wrapped type `any[]`. + * @see _.countBy + **/ + countBy(iterator: string, context?: any): _Chain; - /** - * Wrapped type `any[]`. - * @see _.indexBy - **/ - indexBy(iterator: _.ListIterator, context?: any): _Chain; + /** + * Wrapped type `any[]`. + * @see _.shuffle + **/ + shuffle(): _Chain; - /** - * Wrapped type `any[]`. - * @see _.indexBy - **/ - indexBy(iterator: string, context?: any): _Chain; + /** + * Wrapped type `any[]`. + * @see _.sample + **/ + sample(n: number): _Chain; - /** - * Wrapped type `any[]`. - * @see _.countBy - **/ - countBy(iterator?: _.ListIterator, context?: any): _Chain; + /** + * @see _.sample + **/ + sample(): _Chain; - /** - * Wrapped type `any[]`. - * @see _.countBy - **/ - countBy(iterator: string, context?: any): _Chain; + /** + * Wrapped type `any`. + * @see _.toArray + **/ + toArray(): _Chain; - /** - * Wrapped type `any[]`. - * @see _.shuffle - **/ - shuffle(): _Chain; + /** + * Wrapped type `any`. + * @see _.size + **/ + size(): _ChainSingle; - /** - * Wrapped type `any[]`. - * @see _.sample - **/ - sample(n: number): _Chain; + /********* + * Arrays * + **********/ - /** - * @see _.sample - **/ - sample(): _Chain; + /** + * Wrapped type `any[]`. + * @see _.first + **/ + first(): _ChainSingle; - /** - * Wrapped type `any`. - * @see _.toArray - **/ - toArray(): _Chain; + /** + * Wrapped type `any[]`. + * @see _.first + **/ + first(n: number): _Chain; - /** - * Wrapped type `any`. - * @see _.size - **/ - size(): _ChainSingle; + /** + * @see _.first + **/ + head(): _Chain; - /********* - * Arrays * - **********/ + /** + * @see _.first + **/ + head(n: number): _Chain; - /** - * Wrapped type `any[]`. - * @see _.first - **/ - first(): _ChainSingle; + /** + * @see _.first + **/ + take(): _Chain; - /** - * Wrapped type `any[]`. - * @see _.first - **/ - first(n: number): _Chain; + /** + * @see _.first + **/ + take(n: number): _Chain; - /** - * @see _.first - **/ - head(): _Chain; + /** + * Wrapped type `any[]`. + * @see _.initial + **/ + initial(n?: number): _Chain; - /** - * @see _.first - **/ - head(n: number): _Chain; + /** + * Wrapped type `any[]`. + * @see _.last + **/ + last(): _ChainSingle; - /** - * @see _.first - **/ - take(): _Chain; + /** + * Wrapped type `any[]`. + * @see _.last + **/ + last(n: number): _Chain; - /** - * @see _.first - **/ - take(n: number): _Chain; + /** + * Wrapped type `any[]`. + * @see _.rest + **/ + rest(n?: number): _Chain; - /** - * Wrapped type `any[]`. - * @see _.initial - **/ - initial(n?: number): _Chain; + /** + * @see _.rest + **/ + tail(n?: number): _Chain; - /** - * Wrapped type `any[]`. - * @see _.last - **/ - last(): _ChainSingle; + /** + * @see _.rest + **/ + drop(n?: number): _Chain; - /** - * Wrapped type `any[]`. - * @see _.last - **/ - last(n: number): _Chain; + /** + * Wrapped type `any[]`. + * @see _.compact + **/ + compact(): _Chain; - /** - * Wrapped type `any[]`. - * @see _.rest - **/ - rest(n?: number): _Chain; + /** + * Wrapped type `any`. + * @see _.flatten + **/ + flatten(shallow?: boolean): _Chain; - /** - * @see _.rest - **/ - tail(n?: number): _Chain; + /** + * Wrapped type `any[]`. + * @see _.without + **/ + without(...values: T[]): _Chain; - /** - * @see _.rest - **/ - drop(n?: number): _Chain; + /** + * Wrapped type `any[]`. + * @see _.partition + **/ + partition(iterator: _.ListIterator, context?: any): _Chain; - /** - * Wrapped type `any[]`. - * @see _.compact - **/ - compact(): _Chain; + /** + * Wrapped type `any[][]`. + * @see _.union + **/ + union(...arrays: _.List[]): _Chain; - /** - * Wrapped type `any`. - * @see _.flatten - **/ - flatten(shallow?: boolean): _Chain; + /** + * Wrapped type `any[][]`. + * @see _.intersection + **/ + intersection(...arrays: _.List[]): _Chain; - /** - * Wrapped type `any[]`. - * @see _.without - **/ - without(...values: T[]): _Chain; + /** + * Wrapped type `any[]`. + * @see _.difference + **/ + difference(...others: _.List[]): _Chain; - /** - * Wrapped type `any[]`. - * @see _.partition - **/ - partition(iterator: _.ListIterator, context?: any): _Chain; + /** + * Wrapped type `any[]`. + * @see _.uniq + **/ + uniq(isSorted?: boolean, iterator?: _.ListIterator | _.IterateePropertyShorthand): _Chain; - /** - * Wrapped type `any[][]`. - * @see _.union - **/ - union(...arrays: _.List[]): _Chain; + /** + * Wrapped type `any[]`. + * @see _.uniq + **/ + uniq(iterator?: _.ListIterator | _.IterateePropertyShorthand, context?: any): _Chain; - /** - * Wrapped type `any[][]`. - * @see _.intersection - **/ - intersection(...arrays: _.List[]): _Chain; + /** + * @see _.uniq + **/ + unique(isSorted?: boolean, iterator?: _.ListIterator | _.IterateePropertyShorthand): _Chain; - /** - * Wrapped type `any[]`. - * @see _.difference - **/ - difference(...others: _.List[]): _Chain; + /** + * @see _.uniq + **/ + unique(iterator?: _.ListIterator | _.IterateePropertyShorthand, context?: any): _Chain; - /** - * Wrapped type `any[]`. - * @see _.uniq - **/ - uniq(isSorted?: boolean, iterator?: _.ListIterator): _Chain; + /** + * Wrapped type `any[][]`. + * @see _.zip + **/ + zip(...arrays: any[][]): _Chain; - /** - * Wrapped type `any[]`. - * @see _.uniq - **/ - uniq(iterator?: _.ListIterator, context?: any): _Chain; + /** + * Wrapped type `any[][]`. + * @see _.unzip + **/ + unzip(...arrays: any[][]): _Chain; - /** - * @see _.uniq - **/ - unique(isSorted?: boolean, iterator?: _.ListIterator): _Chain; + /** + * Wrapped type `any[][]`. + * @see _.object + **/ + object(...keyValuePairs: any[][]): _Chain; - /** - * @see _.uniq - **/ - unique(iterator?: _.ListIterator, context?: any): _Chain; + /** + * @see _.object + **/ + object(values?: any): _Chain; - /** - * Wrapped type `any[][]`. - * @see _.zip - **/ - zip(...arrays: any[][]): _Chain; + /** + * Wrapped type `any[]`. + * @see _.indexOf + **/ + indexOf(value: T, isSorted?: boolean): _ChainSingle; - /** - * Wrapped type `any[][]`. - * @see _.unzip - **/ - unzip(...arrays: any[][]): _Chain; + /** + * @see _.indexOf + **/ + indexOf(value: T, startFrom: number): _ChainSingle; - /** - * Wrapped type `any[][]`. - * @see _.object - **/ - object(...keyValuePairs: any[][]): _Chain; + /** + * Wrapped type `any[]`. + * @see _.lastIndexOf + **/ + lastIndexOf(value: T, from?: number): _ChainSingle; - /** - * @see _.object - **/ - object(values?: any): _Chain; + /** + * @see _.findIndex + **/ + findIndex(predicate: _.ListIterator | {}, context?: any): _ChainSingle; - /** - * Wrapped type `any[]`. - * @see _.indexOf - **/ - indexOf(value: T, isSorted?: boolean): _ChainSingle; + /** + * @see _.findLastIndex + **/ + findLastIndex(predicate: _.ListIterator | {}, context?: any): _ChainSingle; - /** - * @see _.indexOf - **/ - indexOf(value: T, startFrom: number): _ChainSingle; + /** + * Wrapped type `any[]`. + * @see _.sortedIndex + **/ + sortedIndex(value: T, iterator?: (x: T) => any, context?: any): _ChainSingle; - /** - * Wrapped type `any[]`. - * @see _.lastIndexOf - **/ - lastIndexOf(value: T, from?: number): _ChainSingle; + /** + * Wrapped type `number`. + * @see _.range + **/ + range(stop: number, step?: number): _Chain; - /** - * @see _.findIndex - **/ - findIndex(predicate: _.ListIterator | {}, context?: any): _ChainSingle; + /** + * Wrapped type `number`. + * @see _.range + **/ + range(): _Chain; - /** - * @see _.findLastIndex - **/ - findLastIndex(predicate: _.ListIterator | {}, context?: any): _ChainSingle; + /** + * Wrapped type `any[][]`. + * @see _.chunk + **/ + chunk(): _Chain; - /** - * Wrapped type `any[]`. - * @see _.sortedIndex - **/ - sortedIndex(value: T, iterator?: (x: T) => any, context?: any): _Chain; + /* *********** + * Functions * + ************ */ - /** - * Wrapped type `number`. - * @see _.range - **/ - range(stop: number, step?: number): _Chain; + /** + * Wrapped type `Function`. + * @see _.bind + **/ + bind(object: any, ...args: any[]): _Chain; - /** - * Wrapped type `number`. - * @see _.range - **/ - range(): _Chain; + /** + * Wrapped type `object`. + * @see _.bindAll + **/ + bindAll(...methodNames: string[]): _Chain; - /* *********** - * Functions * - ************ */ + /** + * Wrapped type `Function`. + * @see _.partial + **/ + partial(...args: any[]): _Chain; - /** - * Wrapped type `Function`. - * @see _.bind - **/ - bind(object: any, ...arguments: any[]): _Chain; + /** + * Wrapped type `Function`. + * @see _.memoize + **/ + memoize(hashFn?: (n: any) => string): _Chain; - /** - * Wrapped type `object`. - * @see _.bindAll - **/ - bindAll(...methodNames: string[]): _Chain; + /** + * Wrapped type `Function`. + * @see _.defer + **/ + defer(...args: any[]): _Chain; - /** - * Wrapped type `Function`. - * @see _.partial - **/ - partial(...arguments: any[]): _Chain; + /** + * Wrapped type `Function`. + * @see _.delay + **/ + delay(wait: number, ...args: any[]): _Chain; - /** - * Wrapped type `Function`. - * @see _.memoize - **/ - memoize(hashFn?: (n: any) => string): _Chain; + /** + * @see _.delay + **/ + delay(...args: any[]): _Chain; - /** - * Wrapped type `Function`. - * @see _.defer - **/ - defer(...arguments: any[]): _Chain; + /** + * Wrapped type `Function`. + * @see _.throttle + **/ + throttle(wait: number, options?: _.ThrottleSettings): _Chain; - /** - * Wrapped type `Function`. - * @see _.delay - **/ - delay(wait: number, ...arguments: any[]): _Chain; + /** + * Wrapped type `Function`. + * @see _.debounce + **/ + debounce(wait: number, immediate?: boolean): _Chain; - /** - * @see _.delay - **/ - delay(...arguments: any[]): _Chain; + /** + * Wrapped type `Function`. + * @see _.once + **/ + once(): _Chain; - /** - * Wrapped type `Function`. - * @see _.throttle - **/ - throttle(wait: number, options?: _.ThrottleSettings): _Chain; + /** + * Wrapped type `Function`. + * @see _.once + **/ + restArgs(startIndex?: number): _Chain; - /** - * Wrapped type `Function`. - * @see _.debounce - **/ - debounce(wait: number, immediate?: boolean): _Chain; + /** + * Wrapped type `number`. + * @see _.after + **/ + after(func: Function): _Chain; - /** - * Wrapped type `Function`. - * @see _.once - **/ - once(): _Chain; + /** + * Wrapped type `number`. + * @see _.before + **/ + before(fn: Function): _Chain; - /** - * Wrapped type `number`. - * @see _.after - **/ - after(func: Function): _Chain; + /** + * Wrapped type `Function`. + * @see _.wrap + **/ + wrap(wrapper: Function): () => _Chain; - /** - * Wrapped type `number`. - * @see _.before - **/ - before(fn: Function): _Chain; + /** + * Wrapped type `Function`. + * @see _.negate + **/ + negate(): _Chain; - /** - * Wrapped type `Function`. - * @see _.wrap - **/ - wrap(wrapper: Function): () => _Chain; + /** + * Wrapped type `Function[]`. + * @see _.compose + **/ + compose(...functions: Function[]): _Chain; - /** - * Wrapped type `Function`. - * @see _.negate - **/ - negate(): _Chain; + /********* * + * Objects * + ********** */ - /** - * Wrapped type `Function[]`. - * @see _.compose - **/ - compose(...functions: Function[]): _Chain; + /** + * Wrapped type `object`. + * @see _.keys + **/ + keys(): _Chain; - /********* * - * Objects * - ********** */ + /** + * Wrapped type `object`. + * @see _.allKeys + **/ + allKeys(): _Chain; - /** - * Wrapped type `object`. - * @see _.keys - **/ - keys(): _Chain; + /** + * Wrapped type `object`. + * @see _.values + **/ + values(): _Chain; - /** - * Wrapped type `object`. - * @see _.allKeys - **/ - allKeys(): _Chain; + /** + * Wrapped type `object`. + * @see _.pairs + **/ + pairs(): _Chain; - /** - * Wrapped type `object`. - * @see _.values - **/ - values(): _Chain; + /** + * Wrapped type `object`. + * @see _.invert + **/ + invert(): _Chain; - /** - * Wrapped type `object`. - * @see _.pairs - **/ - pairs(): _Chain; + /** + * Wrapped type `object`. + * @see _.functions + **/ + functions(): _Chain; - /** - * Wrapped type `object`. - * @see _.invert - **/ - invert(): _Chain; + /** + * @see _.functions + **/ + methods(): _Chain; - /** - * Wrapped type `object`. - * @see _.functions - **/ - functions(): _Chain; + /** + * Wrapped type `object`. + * @see _.extend + **/ + extend(...sources: any[]): _Chain; - /** - * @see _.functions - **/ - methods(): _Chain; + /** + * Wrapped type `object`. + * @see _.extend + **/ + findKey(predicate: _.ObjectIterator, context?: any): _Chain - /** - * Wrapped type `object`. - * @see _.extend - **/ - extend(...sources: any[]): _Chain; + /** + * Wrapped type `object`. + * @see _.pick + **/ + pick(...keys: any[]): _Chain; + pick(keys: any[]): _Chain; + pick(fn: (value: any, key: any, object: any) => any): _Chain; - /** - * Wrapped type `object`. - * @see _.pick - **/ - pick(...keys: any[]): _Chain; - pick(keys: any[]): _Chain; - pick(fn: (value: any, key: any, object: any) => any): _Chain; + /** + * Wrapped type `object`. + * @see _.omit + **/ + omit(...keys: string[]): _Chain; + omit(keys: string[]): _Chain; + omit(iteratee: Function): _Chain; - /** - * Wrapped type `object`. - * @see _.omit - **/ - omit(...keys: string[]): _Chain; - omit(keys: string[]): _Chain; - omit(iteratee: Function): _Chain; + /** + * Wrapped type `object`. + * @see _.defaults + **/ + defaults(...defaults: any[]): _Chain; - /** - * Wrapped type `object`. - * @see _.defaults - **/ - defaults(...defaults: any[]): _Chain; + /** + * Wrapped type `any`. + * @see _.create + **/ + create(props?: Object): _Chain; - /** - * Wrapped type `any[]`. - * @see _.clone - **/ - clone(): _Chain; + /** + * Wrapped type `any[]`. + * @see _.clone + **/ + clone(): _Chain; - /** - * Wrapped type `object`. - * @see _.tap - **/ - tap(interceptor: (...as: any[]) => any): _Chain; + /** + * Wrapped type `object`. + * @see _.tap + **/ + tap(interceptor: (...as: any[]) => any): _Chain; - /** - * Wrapped type `object`. - * @see _.has - **/ - has(key: string): _Chain; + /** + * Wrapped type `object`. + * @see _.has + **/ + has(key: string): _Chain; - /** - * Wrapped type `any[]`. - * @see _.matches - **/ - matches(): _Chain; + /** + * Wrapped type `any[]`. + * @see _.matches + **/ + matches(): _Chain; - /** - * Wrapped type `string`. - * @see _.property - **/ - property(): _Chain; + /** + * Wrapped type `any[]`. + * @see _.matcher + **/ + matcher(): _Chain; - /** - * Wrapped type `object`. - * @see _.propertyOf - **/ - propertyOf(): _Chain; + /** + * Wrapped type `string`. + * @see _.property + **/ + property(): _Chain; - /** - * Wrapped type `object`. - * @see _.isEqual - **/ - isEqual(other: any): _Chain; + /** + * Wrapped type `object`. + * @see _.propertyOf + **/ + propertyOf(): _Chain; - /** - * Wrapped type `object`. - * @see _.isEmpty - **/ - isEmpty(): _Chain; + /** + * Wrapped type `object`. + * @see _.isEqual + **/ + isEqual(other: any): _Chain; - /** - * Wrapped type `object`. - * @see _.isMatch - **/ - isMatch(): _Chain; + /** + * Wrapped type `object`. + * @see _.isEmpty + **/ + isEmpty(): _Chain; - /** - * Wrapped type `object`. - * @see _.isElement - **/ - isElement(): _Chain; + /** + * Wrapped type `object`. + * @see _.isMatch + **/ + isMatch(): _Chain; - /** - * Wrapped type `object`. - * @see _.isArray - **/ - isArray(): _Chain; + /** + * Wrapped type `object`. + * @see _.isElement + **/ + isElement(): _Chain; - /** - * Wrapped type `object`. - * @see _.isObject - **/ - isObject(): _Chain; + /** + * Wrapped type `object`. + * @see _.isArray + **/ + isArray(): _Chain; - /** - * Wrapped type `object`. - * @see _.isArguments - **/ - isArguments(): _Chain; + /** + * Wrapped type `object`. + * @see _.isSymbol + **/ + isSymbol(): _Chain; - /** - * Wrapped type `object`. - * @see _.isFunction - **/ - isFunction(): _Chain; + /** + * Wrapped type `object`. + * @see _.isObject + **/ + isObject(): _Chain; - /** - * Wrapped type `object`. - * @see _.isError - **/ - isError(): _Chain; + /** + * Wrapped type `object`. + * @see _.isArguments + **/ + isArguments(): _Chain; - /** - * Wrapped type `object`. - * @see _.isString - **/ - isString(): _Chain; + /** + * Wrapped type `object`. + * @see _.isFunction + **/ + isFunction(): _Chain; - /** - * Wrapped type `object`. - * @see _.isNumber - **/ - isNumber(): _Chain; + /** + * Wrapped type `object`. + * @see _.isError + **/ + isError(): _Chain; - /** - * Wrapped type `object`. - * @see _.isFinite - **/ - isFinite(): _Chain; + /** + * Wrapped type `object`. + * @see _.isString + **/ + isString(): _Chain; - /** - * Wrapped type `object`. - * @see _.isBoolean - **/ - isBoolean(): _Chain; + /** + * Wrapped type `object`. + * @see _.isNumber + **/ + isNumber(): _Chain; - /** - * Wrapped type `object`. - * @see _.isDate - **/ - isDate(): _Chain; + /** + * Wrapped type `object`. + * @see _.isFinite + **/ + isFinite(): _Chain; - /** - * Wrapped type `object`. - * @see _.isRegExp - **/ - isRegExp(): _Chain; + /** + * Wrapped type `object`. + * @see _.isBoolean + **/ + isBoolean(): _Chain; - /** - * Wrapped type `object`. - * @see _.isNaN - **/ - isNaN(): _Chain; + /** + * Wrapped type `object`. + * @see _.isDate + **/ + isDate(): _Chain; - /** - * Wrapped type `object`. - * @see _.isNull - **/ - isNull(): _Chain; + /** + * Wrapped type `object`. + * @see _.isRegExp + **/ + isRegExp(): _Chain; - /** - * Wrapped type `object`. - * @see _.isUndefined - **/ - isUndefined(): _Chain; + /** + * Wrapped type `object`. + * @see _.isNaN + **/ + isNaN(): _Chain; - /********* * - * Utility * - ********** */ + /** + * Wrapped type `object`. + * @see _.isNull + **/ + isNull(): _Chain; - /** - * Wrapped type `any`. - * @see _.identity - **/ - identity(): _Chain; + /** + * Wrapped type `object`. + * @see _.isUndefined + **/ + isUndefined(): _Chain; - /** - * Wrapped type `any`. - * @see _.constant - **/ - constant(): _Chain; + /********* * + * Utility * + ********** */ - /** - * Wrapped type `any`. - * @see _.noop - **/ - noop(): _Chain; + /** + * Wrapped type `any`. + * @see _.identity + **/ + identity(): _Chain; - /** - * Wrapped type `number`. - * @see _.times - **/ - times(iterator: (n: number) => TResult, context?: any): _Chain; + /** + * Wrapped type `any`. + * @see _.constant + **/ + constant(): _Chain; - /** - * Wrapped type `number`. - * @see _.random - **/ - random(): _Chain; - /** - * Wrapped type `number`. - * @see _.random - **/ - random(max: number): _Chain; + /** + * Wrapped type `any`. + * @see _.noop + **/ + noop(): _Chain; - /** - * Wrapped type `object`. - * @see _.mixin - **/ - mixin(): _Chain; + /** + * Wrapped type `number`. + * @see _.times + **/ + times(iterator: (n: number) => TResult, context?: any): _Chain; - /** - * Wrapped type `string|Function|Object`. - * @see _.iteratee - **/ - iteratee(context?: any, argCount?: number): _Chain; + /** + * Wrapped type `number`. + * @see _.random + **/ + random(): _Chain; + /** + * Wrapped type `number`. + * @see _.random + **/ + random(max: number): _Chain; - /** - * Wrapped type `string`. - * @see _.uniqueId - **/ - uniqueId(): _Chain; + /** + * Wrapped type `object`. + * @see _.mixin + **/ + mixin(): _Chain; - /** - * Wrapped type `string`. - * @see _.escape - **/ - escape(): _Chain; + /** + * Wrapped type `string|Function|Object`. + * @see _.iteratee + **/ + iteratee(context?: any): _Chain; - /** - * Wrapped type `string`. - * @see _.unescape - **/ - unescape(): _Chain; + /** + * Wrapped type `string`. + * @see _.uniqueId + **/ + uniqueId(): _Chain; - /** - * Wrapped type `object`. - * @see _.result - **/ - result(property: string, defaultValue?:any): _Chain; + /** + * Wrapped type `string`. + * @see _.escape + **/ + escape(): _Chain; - /** - * Wrapped type `string`. - * @see _.template - **/ - template(settings?: _.TemplateSettings): (...data: any[]) => _Chain; + /** + * Wrapped type `string`. + * @see _.unescape + **/ + unescape(): _Chain; - /************* * - * Array proxy * - ************** */ + /** + * Wrapped type `object`. + * @see _.result + **/ + result(property: string, defaultValue?: any): _Chain; - /** - * Returns a new array comprised of the array on which it is called - * joined with the array(s) and/or value(s) provided as arguments. - * @param arr Arrays and/or values to concatenate into a new array. See the discussion below for details. - * @return A new array comprised of the array on which it is called - **/ - concat(...arr: Array): _Chain; + /** + * Wrapped type `string`. + * @see _.template + **/ + template(settings?: _.TemplateSettings): (...data: any[]) => _Chain; - /** - * Join all elements of an array into a string. - * @param separator Optional. Specifies a string to separate each element of the array. The separator is converted to a string if necessary. If omitted, the array elements are separated with a comma. - * @return The string conversions of all array elements joined into one string. - **/ - join(separator?: any): _ChainSingle; + /************* * + * Array proxy * + ************** */ - /** - * Removes the last element from an array and returns that element. - * @return Returns the popped element. - **/ - pop(): _ChainSingle; + /** + * Returns a new array comprised of the array on which it is called + * joined with the array(s) and/or value(s) provided as arguments. + * @param arr Arrays and/or values to concatenate into a new array. See the discussion below for details. + * @return A new array comprised of the array on which it is called + **/ + concat(...arr: Array): _Chain; - /** - * Adds one or more elements to the end of an array and returns the new length of the array. - * @param item The elements to add to the end of the array. - * @return The array with the element added to the end. - **/ - push(...item: Array): _Chain; + /** + * Join all elements of an array into a string. + * @param separator Optional. Specifies a string to separate each element of the array. The separator is converted to a string if necessary. If omitted, the array elements are separated with a comma. + * @return The string conversions of all array elements joined into one string. + **/ + join(separator?: any): _ChainSingle; - /** - * Reverses an array in place. The first array element becomes the last and the last becomes the first. - * @return The reversed array. - **/ - reverse(): _Chain; + /** + * Removes the last element from an array and returns that element. + * @return Returns the popped element. + **/ + pop(): _ChainSingle; - /** - * Removes the first element from an array and returns that element. This method changes the length of the array. - * @return The shifted element. - **/ - shift(): _ChainSingle; + /** + * Adds one or more elements to the end of an array and returns the new length of the array. + * @param item The elements to add to the end of the array. + * @return The array with the element added to the end. + **/ + push(...item: Array): _Chain; - /** - * Returns a shallow copy of a portion of an array into a new array object. - * @param start Zero-based index at which to begin extraction. - * @param end Optional. Zero-based index at which to end extraction. slice extracts up to but not including end. - * @return A shallow copy of a portion of an array into a new array object. - **/ - slice(start: number, end?: number): _Chain; + /** + * Reverses an array in place. The first array element becomes the last and the last becomes the first. + * @return The reversed array. + **/ + reverse(): _Chain; - /** - * Sorts the elements of an array in place and returns the array. The sort is not necessarily stable. The default sort order is according to string Unicode code points. - * @param compareFn Optional. Specifies a function that defines the sort order. If omitted, the array is sorted according to each character's Unicode code point value, according to the string conversion of each element. - * @return The sorted array. - **/ - sort(compareFn: (a: T, b: T) => boolean): _Chain; + /** + * Removes the first element from an array and returns that element. This method changes the length of the array. + * @return The shifted element. + **/ + shift(): _ChainSingle; - /** - * Changes the content of an array by removing existing elements and/or adding new elements. - * @param index Index at which to start changing the array. If greater than the length of the array, actual starting index will be set to the length of the array. If negative, will begin that many elements from the end. - * @param quantity An integer indicating the number of old array elements to remove. If deleteCount is 0, no elements are removed. In this case, you should specify at least one new element. If deleteCount is greater than the number of elements left in the array starting at index, then all of the elements through the end of the array will be deleted. - * @param items The element to add to the array. If you don't specify any elements, splice will only remove elements from the array. - * @return An array containing the deleted elements. If only one element is removed, an array of one element is returned. If no elements are removed, an empty array is returned. - **/ - splice(index: number, quantity: number, ...items: Array): _Chain; + /** + * Returns a shallow copy of a portion of an array into a new array object. + * @param start Zero-based index at which to begin extraction. + * @param end Optional. Zero-based index at which to end extraction. slice extracts up to but not including end. + * @return A shallow copy of a portion of an array into a new array object. + **/ + slice(start: number, end?: number): _Chain; - /** - * A string representing the specified array and its elements. - * @return A string representing the specified array and its elements. - **/ - toString(): _ChainSingle; + /** + * Sorts the elements of an array in place and returns the array. The sort is not necessarily stable. The default sort order is according to string Unicode code points. + * @param compareFn Optional. Specifies a function that defines the sort order. If omitted, the array is sorted according to each character's Unicode code point value, according to the string conversion of each element. + * @return The sorted array. + **/ + sort(compareFn?: (a: T, b: T) => boolean): _Chain; - /** - * Adds one or more elements to the beginning of an array and returns the new length of the array. - * @param items The elements to add to the front of the array. - * @return The array with the element added to the beginning. - **/ - unshift(...items: Array): _Chain; + /** + * Changes the content of an array by removing existing elements and/or adding new elements. + * @param index Index at which to start changing the array. If greater than the length of the array, actual starting index will be set to the length of the array. If negative, will begin that many elements from the end. + * @param quantity An integer indicating the number of old array elements to remove. If deleteCount is 0, no elements are removed. In this case, you should specify at least one new element. If deleteCount is greater than the number of elements left in the array starting at index, then all of the elements through the end of the array will be deleted. + * @param items The element to add to the array. If you don't specify any elements, splice will only remove elements from the array. + * @return An array containing the deleted elements. If only one element is removed, an array of one element is returned. If no elements are removed, an empty array is returned. + **/ + splice(index: number, quantity: number, ...items: Array): _Chain; - /********** * - * Chaining * - *********** */ + /** + * A string representing the specified array and its elements. + * @return A string representing the specified array and its elements. + **/ + toString(): _ChainSingle; - /** - * Wrapped type `any`. - * @see _.chain - **/ - chain(): _Chain; + /** + * Adds one or more elements to the beginning of an array and returns the new length of the array. + * @param items The elements to add to the front of the array. + * @return The array with the element added to the beginning. + **/ + unshift(...items: Array): _Chain; - /** - * Wrapped type `any`. - * @see _.value - **/ - value(): T[]; -} -interface _ChainSingle { - value(): T; -} -interface _ChainOfArrays extends _Chain { - flatten(shallow?: boolean): _Chain; - mapObject(fn: _.ListIterator): _ChainOfArrays; -} + /********** * + * Chaining * + *********** */ -declare var _: UnderscoreStatic; + /** + * Wrapped type `any`. + * @see _.chain + **/ + chain(): _Chain; -declare module "underscore" { - export = _; + /** + * Wrapped type `any`. + * @see _.value + **/ + value(): T[]; + } + interface _ChainSingle { + value(): T; + } + interface _ChainOfArrays extends _Chain { + flatten(shallow?: boolean): _Chain; + mapObject(fn: _.ListIterator): _ChainOfArrays; + } } \ No newline at end of file From f98d3e3c1f53d3df57b6840213a999fee88871f5 Mon Sep 17 00:00:00 2001 From: Hamlet D'Arcy Date: Mon, 18 Dec 2017 12:45:17 +0100 Subject: [PATCH 09/19] #000 upgrade chai to 4.1.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 44903fa97..0d4d485a1 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "tsutils": "2.7.1" }, "devDependencies": { - "chai": "3.2.0", + "chai": "4.1.2", "grunt": "^1.0.1", "grunt-contrib-clean": "^1.1.0", "grunt-contrib-copy": "^1.0.0", From 1135828203d00032bdd5301625ab5128664af73c Mon Sep 17 00:00:00 2001 From: Hamlet D'Arcy Date: Mon, 18 Dec 2017 12:46:58 +0100 Subject: [PATCH 10/19] #000 upgrade mocha to 4.0.1 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0d4d485a1..b3f3c1d5a 100644 --- a/package.json +++ b/package.json @@ -44,11 +44,11 @@ "grunt-contrib-clean": "^1.1.0", "grunt-contrib-copy": "^1.0.0", "grunt-contrib-watch": "^1.0.0", - "grunt-mocha-test": "0.13.2", + "grunt-mocha-test": "0.13.3", "grunt-ts": "^6.0.0-beta.16", "grunt-tslint": "^5.0.1", "load-grunt-tasks": "3.2.0", - "mocha": "2.2.5", + "mocha": "4.0.1", "time-grunt": "1.2.1", "tslint": "5.1.0", "typescript": "2.6.2", From b5e3cfc11e2f9080cfeb6c42db69b13123def498 Mon Sep 17 00:00:00 2001 From: Hamlet D'Arcy Date: Mon, 18 Dec 2017 14:06:43 +0100 Subject: [PATCH 11/19] #000 Upgraded to tslint 5.8.0 --- Gruntfile.js | 13 +- additional_rule_metadata.json | 198 +++++++++++++++++- package.json | 4 +- recommended_ruleset.js | 26 ++- src/noUnexternalizedStringsRule.ts | 4 +- src/tests/NoRelativeImportsRuleTests.ts | 4 +- src/tests/NoUnexternalizedStringsRuleTests.ts | 13 +- src/utils/BaseFormatter.ts | 3 +- src/utils/JsxAttribute.ts | 6 +- src/utils/Utils.ts | 2 +- src/utils/getImplicitRole.ts | 2 +- tsconfig.json | 1 + tslint-warnings.csv | 35 +++- tslint.json | 26 ++- 14 files changed, 311 insertions(+), 26 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 072b0e157..6e39e10f0 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -219,7 +219,8 @@ module.exports = function(grunt) { tslint: { options: { - rulesDirectory: 'dist/src' + rulesDirectory: 'dist/src', + formatter: 'verbose' }, prod: { options: { @@ -240,6 +241,7 @@ module.exports = function(grunt) { tslintJson.rules['quotemark'] = false; tslintJson.rules['object-literal-key-quotes'] = false; tslintJson.rules['max-func-body-length'] = false; + tslintJson.rules['no-implicit-dependencies'] = [true, 'dev']; return tslintJson; })() }, @@ -313,8 +315,15 @@ module.exports = function(grunt) { var tslintConfig = grunt.file.readJSON('tslint.json', { encoding: 'UTF-8' }); var rulesToSkip = { 'ban-types': true, - 'match-default-export-name': true, // requires type checking + 'prefer-conditional-expression': true, // not sure if this is needed + 'type-literal-delimiter': true, // not sure if this is needed + 'no-parameter-reassignment': true, // turn this on eventually + 'match-default-export-name': true, // requires type checking + 'deprecation': true, // requires type checking + 'no-unnecessary-type-assertion': true, // requires type checking + 'use-default-type-parameter': true, // requires type checking 'newline-before-return': true, // kind of a silly rule + 'prefer-switch': true, // no need 'no-non-null-assertion': true, // in fact we prefer the opposite rule 'prefer-template': true, // rule does not handle multi-line strings nicely 'return-undefined': true, // requires type checking diff --git a/additional_rule_metadata.json b/additional_rule_metadata.json index 272fb82e7..321c9504a 100644 --- a/additional_rule_metadata.json +++ b/additional_rule_metadata.json @@ -975,8 +975,204 @@ "issueType": "Warning", "severity": "Important", "level": "Opportunity for Excellence", - "group": "Clarity", + "group": "Configurable", "commonWeaknessEnumeration": "710", "recommendation": "false, // this actually affect the readability of the code" + }, + "ban-comma-operator": { + "issueClass": "Non-SDL", + "issueType": "Warning", + "severity": "Moderate", + "level": "Opportunity for Excellence", + "group": "Clarity", + "commonWeaknessEnumeration": "710", + "recommendation": "true, // possibly controversial" + }, + "binary-expression-operand-order": { + "issueClass": "Non-SDL", + "issueType": "Warning", + "severity": "Moderate", + "level": "Opportunity for Excellence", + "group": "Clarity", + "commonWeaknessEnumeration": "710" + }, + "deprecation": { + "issueClass": "Non-SDL", + "issueType": "Warning", + "severity": "Moderate", + "level": "Opportunity for Excellence", + "group": "Configurable", + "commonWeaknessEnumeration": "710", + "recommendation": "false, // deprecated APIs are sometimes unavoidable" + }, + "no-duplicate-imports": { + "issueClass": "Non-SDL", + "issueType": "Warning", + "severity": "Moderate", + "level": "Opportunity for Excellence", + "group": "Clarity", + "commonWeaknessEnumeration": "710" + }, + "no-duplicate-switch-case": { + "issueClass": "Non-SDL", + "issueType": "Warning", + "severity": "Moderate", + "level": "Opportunity for Excellence", + "group": "Correctness", + "commonWeaknessEnumeration": "710" + }, + "no-implicit-dependencies": { + "issueClass": "Non-SDL", + "issueType": "Warning", + "severity": "Moderate", + "level": "Opportunity for Excellence", + "group": "Correctness", + "commonWeaknessEnumeration": "710" + }, + "no-irregular-whitespace": { + "issueClass": "Non-SDL", + "issueType": "Warning", + "severity": "Moderate", + "level": "Opportunity for Excellence", + "group": "Whitespace", + "commonWeaknessEnumeration": "710" + }, + "encoding": { + "issueClass": "Non-SDL", + "issueType": "Warning", + "severity": "Moderate", + "level": "Opportunity for Excellence", + "group": "Whitespace", + "commonWeaknessEnumeration": "710" + }, + "no-object-literal-type-assertion": { + "issueClass": "Non-SDL", + "issueType": "Warning", + "severity": "Moderate", + "level": "Opportunity for Excellence", + "group": "Correctness", + "commonWeaknessEnumeration": "710" + }, + "no-parameter-reassignment": { + "issueClass": "Non-SDL", + "issueType": "Warning", + "severity": "Moderate", + "level": "Opportunity for Excellence", + "group": "Correctness", + "commonWeaknessEnumeration": "710" + }, + "no-redundant-jsdoc": { + "issueClass": "Non-SDL", + "issueType": "Warning", + "severity": "Low", + "level": "Opportunity for Excellence", + "group": "Clarity", + "commonWeaknessEnumeration": "710" + }, + "no-return-await": { + "issueClass": "Non-SDL", + "issueType": "Warning", + "severity": "Moderate", + "level": "Opportunity for Excellence", + "group": "Clarity", + "commonWeaknessEnumeration": "710" + }, + "no-submodule-imports": { + "issueClass": "Non-SDL", + "issueType": "Warning", + "severity": "Moderate", + "level": "Opportunity for Excellence", + "group": "Correctness", + "commonWeaknessEnumeration": "710" + }, + "no-this-assignment": { + "issueClass": "Non-SDL", + "issueType": "Warning", + "severity": "Moderate", + "level": "Opportunity for Excellence", + "group": "Clarity", + "commonWeaknessEnumeration": "710" + }, + "no-unnecessary-class": { + "issueClass": "Non-SDL", + "issueType": "Warning", + "severity": "Moderate", + "level": "Opportunity for Excellence", + "group": "Clarity", + "commonWeaknessEnumeration": "710" + }, + "no-unnecessary-type-assertion": { + "issueClass": "Non-SDL", + "issueType": "Warning", + "severity": "Moderate", + "level": "Opportunity for Excellence", + "group": "Clarity", + "commonWeaknessEnumeration": "710" + }, + "number-literal-format": { + "issueClass": "Non-SDL", + "issueType": "Warning", + "severity": "Low", + "level": "Opportunity for Excellence", + "group": "Clarity", + "commonWeaknessEnumeration": "710" + }, + "prefer-conditional-expression": { + "issueClass": "Non-SDL", + "issueType": "Warning", + "severity": "Low", + "level": "Opportunity for Excellence", + "group": "Configurable", + "commonWeaknessEnumeration": "710", + "recommendation": "false, // unnecessarily strict" + }, + "prefer-object-spread": { + "issueClass": "Non-SDL", + "issueType": "Warning", + "severity": "Low", + "level": "Opportunity for Excellence", + "group": "Clarity", + "commonWeaknessEnumeration": "710" + }, + "prefer-switch": { + "issueClass": "Non-SDL", + "issueType": "Warning", + "severity": "Low", + "level": "Opportunity for Excellence", + "group": "Configurable", + "commonWeaknessEnumeration": "710", + "recommendation": "false, // more of a style preference" + }, + "space-within-parens": { + "issueClass": "Non-SDL", + "issueType": "Warning", + "severity": "Low", + "level": "Opportunity for Excellence", + "group": "Whitespace", + "commonWeaknessEnumeration": "710" + }, + "switch-final-break": { + "issueClass": "Non-SDL", + "issueType": "Warning", + "severity": "Low", + "level": "Opportunity for Excellence", + "group": "Correctness", + "commonWeaknessEnumeration": "710" + }, + "type-literal-delimiter": { + "issueClass": "Non-SDL", + "issueType": "Warning", + "severity": "Low", + "level": "Opportunity for Excellence", + "group": "Clarity", + "commonWeaknessEnumeration": "710" + }, + "use-default-type-parameter": { + "issueClass": "Non-SDL", + "issueType": "Warning", + "severity": "Low", + "level": "Opportunity for Excellence", + "group": "Clarity", + "commonWeaknessEnumeration": "710" } } diff --git a/package.json b/package.json index b3f3c1d5a..5ba65097c 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "test": "grunt all" }, "dependencies": { - "tsutils": "2.7.1" + "tsutils": "^2.12.1" }, "devDependencies": { "chai": "4.1.2", @@ -50,7 +50,7 @@ "load-grunt-tasks": "3.2.0", "mocha": "4.0.1", "time-grunt": "1.2.1", - "tslint": "5.1.0", + "tslint": "5.8.0", "typescript": "2.6.2", "underscore": "1.8.3" }, diff --git a/recommended_ruleset.js b/recommended_ruleset.js index 2d43d65fa..44d02d1c4 100644 --- a/recommended_ruleset.js +++ b/recommended_ruleset.js @@ -54,10 +54,12 @@ module.exports = { "no-debugger": true, "no-duplicate-case": true, "no-duplicate-super": true, + "no-duplicate-switch-case": true, "no-duplicate-variable": true, "no-empty": true, "no-floating-promises": true, "no-for-in-array": true, + "no-implicit-dependencies": true, "no-import-side-effect": true, "no-increment-decrement": true, "no-invalid-regexp": true, @@ -66,12 +68,15 @@ module.exports = { "no-jquery-raw-elements": true, "no-misused-new": true, "no-non-null-assertion": true, + "no-object-literal-type-assertion": true, + "no-parameter-reassignment": true, "no-reference-import": true, "no-regex-spaces": true, "no-sparse-arrays": true, "no-stateless-class": true, "no-string-literal": true, "no-string-throw": true, + "no-submodule-imports": true, "no-unnecessary-bind": true, "no-unnecessary-callback-wrapper": true, "no-unnecessary-initializer": true, @@ -89,6 +94,7 @@ module.exports = { "restrict-plus-operands": true, // the plus operand should really only be used for strings and numbers "strict-boolean-expressions": true, "switch-default": true, + "switch-final-break": true, "triple-equals": [true, "allow-null-check"], "use-isnan": true, "use-named-parameter": true, @@ -101,6 +107,8 @@ module.exports = { "adjacent-overload-signatures": true, "array-type": [true, "array"], "arrow-parens": false, // for simple functions the parens on arrow functions are not needed + "ban-comma-operator": true, // possibly controversial + "binary-expression-operand-order": true, "callable-types": true, "chai-prefer-contains-to-index-of": true, "chai-vague-errors": true, @@ -123,6 +131,7 @@ module.exports = { "new-parens": true, "no-construct": true, "no-default-export": true, + "no-duplicate-imports": true, "no-empty-interface": true, "no-for-in": true, "no-function-expression": true, @@ -130,20 +139,26 @@ module.exports = { "no-multiline-string": true, // multiline-strings often introduce unnecessary whitespace into the string literals "no-null-keyword": false, // turn no-null-keyword off and use undefined to mean not initialized and null to mean without a value "no-parameter-properties": true, + "no-redundant-jsdoc": true, "no-relative-imports": true, "no-require-imports": true, + "no-return-await": true, "no-shadowed-variable": true, "no-suspicious-comment": true, + "no-this-assignment": true, "no-typeof-undefined": true, + "no-unnecessary-class": true, "no-unnecessary-field-initialization": true, "no-unnecessary-local-variable": true, "no-unnecessary-qualifier": true, + "no-unnecessary-type-assertion": true, "no-unsupported-browser-code": true, "no-useless-files": true, "no-var-keyword": true, "no-var-requires": true, "no-var-self": true, "no-void-expression": true, + "number-literal-format": true, "object-literal-sort-keys": false, // turn object-literal-sort-keys off and sort keys in a meaningful manner "one-variable-per-declaration": true, "only-arrow-functions": false, // there are many valid reasons to declare a function @@ -152,11 +167,13 @@ module.exports = { "prefer-const": true, "prefer-for-of": true, "prefer-method-signature": true, + "prefer-object-spread": true, "prefer-template": true, - "return-undefined": false, // this actually affect the readability of the code + "type-literal-delimiter": true, "typedef": [true, "call-signature", "arrow-call-signature", "parameter", "arrow-parameter", "property-declaration", "variable-declaration", "member-variable-declaration"], "underscore-consistent-invocation": true, "unified-signatures": true, + "use-default-type-parameter": true, "variable-name": true, /** @@ -184,6 +201,7 @@ module.exports = { */ "align": [true, "parameters", "arguments", "statements"], "curly": true, + "encoding": true, "eofline": true, "import-spacing": true, "indent": [true, "spaces"], @@ -191,6 +209,7 @@ module.exports = { "newline-before-return": true, "no-consecutive-blank-lines": true, "no-empty-line-after-opening-brace": false, + "no-irregular-whitespace": true, "no-single-line-block-comment": true, "no-trailing-whitespace": true, "no-unnecessary-semicolons": true, @@ -199,6 +218,7 @@ module.exports = { "quotemark": [true, "single"], "react-tsx-curly-spacing": true, "semicolon": [true, "always"], + "space-within-parens": true, "trailing-comma": [true, {"singleline": "never", "multiline": "never"}], // forcing trailing commas for multi-line // lists results in lists that are easier to reorder and version control diffs that are more clear. // Many teams like to have multiline be 'always'. There is no clear consensus on this rule but the @@ -212,6 +232,7 @@ module.exports = { "ban": false, // only enable this if you have some code pattern that you want to ban "ban-types": true, "cyclomatic-complexity": true, + "deprecation": false, // deprecated APIs are sometimes unavoidable "file-header": false, // enable this rule only if you are legally required to add a file header "import-blacklist": false, // enable and configure this as you desire "interface-over-type-literal": false, // there are plenty of reasons to prefer interfaces @@ -224,7 +245,10 @@ module.exports = { "no-reference": true, // in general you should use a module system and not /// reference imports "no-unexternalized-strings": false, // the VS Code team has a specific localization process that this rule enforces "object-literal-shorthand": false, // object-literal-shorthand offers an abbreviation not an abstraction + "prefer-conditional-expression": false, // unnecessarily strict + "prefer-switch": false, // more of a style preference "prefer-type-cast": true, // pick either type-cast format and use it consistently + "return-undefined": false, // this actually affect the readability of the code "space-before-function-paren": false, // turn this on if this is really your coding standard /** diff --git a/src/noUnexternalizedStringsRule.ts b/src/noUnexternalizedStringsRule.ts index bc339d4c5..55fdb03c9 100644 --- a/src/noUnexternalizedStringsRule.ts +++ b/src/noUnexternalizedStringsRule.ts @@ -83,7 +83,7 @@ class NoUnexternalizedStringsRuleWalker extends ErrorTolerantWalker { return; } const callInfo = info ? info.callInfo : null; - if (callInfo && this.ignores[callInfo.callExpression.expression.getText()]) { + if (callInfo && this.ignores[callInfo.callExpression.expression.getText()]) { return; } if (!callInfo || callInfo.argIndex === -1 || !this.signatures[callInfo.callExpression.expression.getText()]) { @@ -96,7 +96,7 @@ class NoUnexternalizedStringsRuleWalker extends ErrorTolerantWalker { : null; if (messageArg && messageArg !== node) { this.addFailureAt( - messageArg.getStart(), messageArg.getWidth(), + node.getStart(), node.getWidth(), `Message argument to '${callInfo.callExpression.expression.getText()}' must be a string literal.`); return; } diff --git a/src/tests/NoRelativeImportsRuleTests.ts b/src/tests/NoRelativeImportsRuleTests.ts index 6e7916790..5755a9798 100644 --- a/src/tests/NoRelativeImportsRuleTests.ts +++ b/src/tests/NoRelativeImportsRuleTests.ts @@ -1,3 +1,4 @@ +/* tslint:disable:no-irregular-whitespace */ import {TestHelper} from './TestHelper'; /** @@ -70,4 +71,5 @@ describe('noRelativeImportsRule', () : void => { ]); }); -}); \ No newline at end of file +}); +/* tslint:enable:no-irregular-whitespace */ diff --git a/src/tests/NoUnexternalizedStringsRuleTests.ts b/src/tests/NoUnexternalizedStringsRuleTests.ts index 744b97a43..9b6cce282 100644 --- a/src/tests/NoUnexternalizedStringsRuleTests.ts +++ b/src/tests/NoUnexternalizedStringsRuleTests.ts @@ -158,10 +158,15 @@ describe('noUnexternalizedStringsRule', () : void => { "failure": "Message argument to 'localize' must be a string literal.", "name": "file.ts", "ruleName": "no-unexternalized-strings", - "startPosition": { - "character": 29, - "line": 2 - } + "ruleSeverity": "ERROR", + "startPosition": { "character": 29, "line": 2 } + }, + { + "failure": "Message argument to 'localize' must be a string literal.", + "name": "file.ts", + "ruleName": "no-unexternalized-strings", + "ruleSeverity": "ERROR", + "startPosition": { "character": 40, "line": 2 } } ]); }); diff --git a/src/utils/BaseFormatter.ts b/src/utils/BaseFormatter.ts index 28aa256d1..808da55d3 100644 --- a/src/utils/BaseFormatter.ts +++ b/src/utils/BaseFormatter.ts @@ -1,8 +1,7 @@ 'use strict'; import * as fs from 'fs'; -import {Formatters} from 'tslint'; -import {RuleFailure} from 'tslint'; +import {Formatters, RuleFailure} from 'tslint'; /** * A base class for formatters that fix linting issues. diff --git a/src/utils/JsxAttribute.ts b/src/utils/JsxAttribute.ts index 222b1a310..a997e37e7 100644 --- a/src/utils/JsxAttribute.ts +++ b/src/utils/JsxAttribute.ts @@ -161,7 +161,7 @@ export function getAllAttributesFromJsxElement(node: ts.Node): ts.NodeArray(list : ReadonlyArray, predicate: (t: T) => boolean) : boolean { - if (list != null ) { + if (list != null) { for (let i = 0; i < list.length; i++) { const obj : T = list[i]; if (predicate(obj)) { diff --git a/src/utils/getImplicitRole.ts b/src/utils/getImplicitRole.ts index a5cf16d80..eb9e34dfe 100644 --- a/src/utils/getImplicitRole.ts +++ b/src/utils/getImplicitRole.ts @@ -3,7 +3,7 @@ import * as implicitRoles from './implicitRoles'; import { isJsxElement, isJsxSelfClosingElement, isJsxOpeningElement } from './TypeGuard'; /** - * @returns { string } the implicit role or undefined if no corresponding role for a + * @returns string of the implicit role or undefined if no corresponding role for a * JsxElement, JsxSelfClosingElement or JsxOpeningElement. * The implementation is inspired and re-implemented from * https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/src/util/getImplicitRole.js diff --git a/tsconfig.json b/tsconfig.json index 562ce7219..571bc660d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -20,6 +20,7 @@ "outDir": "dist/src", "removeComments": true, "sourceMap": true, + "skipLibCheck": true, "target": "es5" }, "include": [ diff --git a/tslint-warnings.csv b/tslint-warnings.csv index 772ab2bfb..2d68a5208 100644 --- a/tslint-warnings.csv +++ b/tslint-warnings.csv @@ -4,6 +4,8 @@ align,Enforces vertical alignment.,TSLINTT6VKI6,tslint,Non-SDL,Warning,Low,Oppor CWE 710 - Coding Standards Violation" array-type,Requires using either 'T[]' or 'Array' for arrays.,TSLINT11L733J,tslint,Non-SDL,Warning,Low,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,, await-promise,Warns for an awaited value that is not a Promise.,TSLINT14G9IF5,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,, +ban-comma-operator,Bans the comma operator.,TSLINT1GR8O3P,tslint,Non-SDL,Warning,Moderate,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,710,"CWE 710 - Coding Standards Violation" +binary-expression-operand-order,"In a binary expression, a literal should always be on the right-hand side if possible. For example, prefer 'x + 1' over '1 + x'.",TSLINT1RMDJP2,tslint,Non-SDL,Warning,Moderate,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,710,"CWE 710 - Coding Standards Violation" callable-types,An interface or literal type with just a call signature can be written as a function type.,TSLINTAJ483,tslint,Non-SDL,Warning,Low,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,, chai-prefer-contains-to-index-of,Avoid Chai assertions that invoke indexOf and compare for a -1 result.,TSLINTCSVNDE,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,"398, 710","CWE 398 - Indicator of Poor Code Quality CWE 710 - Coding Standards Violation" @@ -17,6 +19,8 @@ completed-docs,Enforces documentation for important items be filled out.,TSLINTT curly,Enforces braces for `if`/`for`/`do`/`while` statements.,TSLINTT90EOE,tslint,Non-SDL,Warning,Low,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,"483, 710","CWE 483 - Incorrect Block Delimitation CWE 710 - Coding Standards Violation" cyclomatic-complexity,Enforces a threshold of cyclomatic complexity.,TSLINT1F0UAB2,tslint,Non-SDL,Warning,Low,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,, +deprecation,Warns when deprecated APIs are used.,TSLINTJ5MPVL,tslint,Non-SDL,Warning,Moderate,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,710,"CWE 710 - Coding Standards Violation" +encoding,Enforces UTF-8 file encoding.,TSLINT1D4H7JI,tslint,Non-SDL,Warning,Moderate,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,710,"CWE 710 - Coding Standards Violation" forin,Requires a `for ... in` statement to be filtered with an `if` statement.,TSLINTTBFHNF,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,"398, 710","CWE 398 - Indicator of Poor Code Quality CWE 710 - Coding Standards Violation" function-name,Applies a naming convention to function names and method names,TSLINTN7VHIV,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,"398, 710","CWE 398 - Indicator of Poor Code Quality @@ -90,7 +94,9 @@ no-document-write,Do not use document.write,TSLINTMGIOVQ,tslint,SDL,Error,Critic CWE 85 - Doubled Character XSS Manipulations" no-duplicate-case,Do not use duplicate case labels in switch statements.,TSLINT3MSPFV,tslint,Non-SDL,Error,Critical,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,"398, 710","CWE 398 - Indicator of Poor Code Quality CWE 710 - Coding Standards Violation" +no-duplicate-imports,Disallows multiple import statements from the same module.,TSLINTCULS1V,tslint,Non-SDL,Warning,Moderate,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,710,"CWE 710 - Coding Standards Violation" no-duplicate-super,Warns if 'super()' appears twice in a constructor.,TSLINTCBE8BK,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,710,"CWE 710 - Coding Standards Violation" +no-duplicate-switch-case,Prevents duplicate cases in switch statements.,TSLINT1P1MP3Q,tslint,Non-SDL,Warning,Moderate,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,710,"CWE 710 - Coding Standards Violation" no-duplicate-variable,Disallows duplicate variable declarations in the same block scope.,TSLINT6TMGHL,tslint,Non-SDL,Error,Critical,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,398,"CWE 398 - Indicator of Poor Code Quality" no-empty,Disallows empty blocks.,TSLINTJ99V50,tslint,Non-SDL,Warning,Moderate,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,398,"CWE 398 - Indicator of Poor Code Quality" no-empty-interface,Forbids empty interfaces.,TSLINTEPMP7K,tslint,Non-SDL,Warning,Moderate,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,"398, 710","CWE 398 - Indicator of Poor Code Quality @@ -112,6 +118,7 @@ CWE 116 - Improper Encoding or Escaping of Output" no-function-expression,Do not use function expressions; use arrow functions (lambdas) instead.,TSLINT1SUK540,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,"398, 710","CWE 398 - Indicator of Poor Code Quality CWE 710 - Coding Standards Violation" no-http-string,Do not use strings that start with 'http:'. URL strings should start with 'https:'. ,TSLINT1IH80PN,tslint,SDL,Error,Critical,Mandatory,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,319,"CWE 319 - Cleartext Transmission of Sensitive Information" +no-implicit-dependencies,Disallows importing modules that are not listed as dependency in the project's package.json,TSLINT1EUA214,tslint,Non-SDL,Warning,Moderate,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,710,"CWE 710 - Coding Standards Violation" no-import-side-effect,Avoid import statements with side-effect.,TSLINTDMTAKK,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,710,"CWE 710 - Coding Standards Violation" no-increment-decrement,Avoid use of increment and decrement operators particularly as part of complicated expressions,TSLINTEJN48,tslint,Non-SDL,Warning,Low,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,"398, 710","CWE 398 - Indicator of Poor Code Quality CWE 710 - Coding Standards Violation" @@ -121,16 +128,21 @@ CWE 710 - Coding Standards Violation" no-invalid-regexp,Do not use invalid regular expression strings in the RegExp constructor.,TSLINT18FB6OK,tslint,Non-SDL,Error,Critical,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,, no-invalid-template-strings,Warns on use of `${` in non-template strings.,TSLINT10TRETE,tslint,Non-SDL,Warning,Moderate,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,710,"CWE 710 - Coding Standards Violation" no-invalid-this,Disallows using the `this` keyword outside of classes.,TSLINTD2VI5V,tslint,Non-SDL,Error,Critical,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,, +no-irregular-whitespace,Disallow irregular whitespace outside of strings and comments,TSLINT4PJDU4,tslint,Non-SDL,Warning,Moderate,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,710,"CWE 710 - Coding Standards Violation" no-jquery-raw-elements,Do not create HTML elements using JQuery and string concatenation. It is error prone and can hide subtle defects.,TSLINTBQ3MR2,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,"398, 710","CWE 398 - Indicator of Poor Code Quality CWE 710 - Coding Standards Violation" no-misused-new,Warns on apparent attempts to define constructors for interfaces or `new` for classes.,TSLINTL96MA6,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,, no-multiline-string,Do not declare multiline strings,TSLINT10K5P9U,tslint,Non-SDL,Warning,Low,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,710,"CWE 710 - Coding Standards Violation" -no-non-null-assertion,Disallows non-null assertions.,TSLINTNO75FN,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,710,"CWE 710 - Coding Standards Violation" +no-non-null-assertion,Disallows non-null assertions using the `!` postfix operator.,TSLINTNO75FN,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,710,"CWE 710 - Coding Standards Violation" +no-object-literal-type-assertion,Forbids an object literal to appear in a type assertion expression. Casting to `any` is still allowed.,TSLINT1EVNJ3E,tslint,Non-SDL,Warning,Moderate,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,710,"CWE 710 - Coding Standards Violation" no-octal-literal,Do not use octal literals or escaped octal sequences,TSLINT1F5BIM0,tslint,SDL,Error,Critical,Mandatory,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,, no-parameter-properties,Disallows parameter properties in class constructors.,TSLINT1FFCD4S,tslint,Non-SDL,Warning,Low,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,, -no-reference-import,Don't if you import "foo" anyway.,TSLINT178RR3K,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,710,"CWE 710 - Coding Standards Violation" +no-parameter-reassignment,Disallows reassigning parameters.,TSLINTHAE9PH,tslint,Non-SDL,Warning,Moderate,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,710,"CWE 710 - Coding Standards Violation" +no-redundant-jsdoc,Forbids JSDoc which duplicates TypeScript functionality.,TSLINT18FS262,tslint,Non-SDL,Warning,Low,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,710,"CWE 710 - Coding Standards Violation" +no-reference-import,Don't `` if you import `foo` anyway.,TSLINT178RR3K,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,710,"CWE 710 - Coding Standards Violation" no-regex-spaces,Do not use multiple spaces in a regular expression literal. Similar to the ESLint no-regex-spaces rule,TSLINT1T5TJ80,tslint,Non-SDL,Error,Critical,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,, no-reserved-keywords,"Do not use reserved keywords as names of local variables, fields, functions, or other identifiers.",TSLINT14J77I2,tslint,SDL,Error,Critical,Mandatory,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,398,"CWE 398 - Indicator of Poor Code Quality" +no-return-await,Disallows unnecessary `return await`.,TSLINT13MNGNQ,tslint,Non-SDL,Warning,Moderate,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,710,"CWE 710 - Coding Standards Violation" no-shadowed-variable,Disallows shadowing variable declarations.,TSLINTH3IPT3,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,"398, 710","CWE 398 - Indicator of Poor Code Quality CWE 710 - Coding Standards Violation" no-single-line-block-comment,Avoid single line block comments; use single line comments instead,TSLINT1GP42PU,tslint,Non-SDL,Warning,Low,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,710,"CWE 710 - Coding Standards Violation" @@ -149,19 +161,23 @@ no-string-based-set-timeout,Do not use the version of setTimeout that accepts co CWE 676 - Use of Potentially Dangerous Function CWE 242 - Use of Inherently Dangerous Function CWE 116 - Improper Encoding or Escaping of Output" -no-string-literal,Disallows object access via string literals.,TSLINT2USQI0,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,"398, 710","CWE 398 - Indicator of Poor Code Quality +no-string-literal,Forbids unnecessary string literal property access. Allows `obj["prop-erty"]` (can't be a regular property access). +Disallows `obj["property"]` (should be `obj.property`).,TSLINT2USQI0,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,"398, 710","CWE 398 - Indicator of Poor Code Quality CWE 710 - Coding Standards Violation" no-string-throw,Flags throwing plain strings or concatenations of strings because only Errors produce proper stack traces.,TSLINT1PEDNQ9,tslint,Non-SDL,Warning,High,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,, +no-submodule-imports,Disallows importing any submodule.,TSLINT1L169N0,tslint,Non-SDL,Warning,Moderate,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,710,"CWE 710 - Coding Standards Violation" no-suspicious-comment,"Do not use suspicious comments, such as BUG, HACK, FIXME, LATER, LATER2, TODO",TSLINT1MEQM5S,tslint,Non-SDL,Warning,Low,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,546,"CWE 546 - Suspicious Comment" no-switch-case-fall-through,Disallows falling through case statements.,TSLINTOMSBL4,tslint,Non-SDL,Warning,Low,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,"398, 484, 710","CWE 398 - Indicator of Poor Code Quality CWE 484 - Omitted Break Statement in Switch CWE 710 - Coding Standards Violation" +no-this-assignment,Disallows unnecessary references to `this`.,TSLINTL0ODTF,tslint,Non-SDL,Warning,Moderate,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,710,"CWE 710 - Coding Standards Violation" no-trailing-whitespace,Disallows trailing whitespace at the end of a line.,TSLINTI9P6D1,tslint,Non-SDL,Warning,Low,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,"398, 710","CWE 398 - Indicator of Poor Code Quality CWE 710 - Coding Standards Violation" no-typeof-undefined,Do not use the idiom typeof `x === 'undefined'`. You can safely use the simpler x === undefined or perhaps x == null if you want to check for either null or undefined.,TSLINTQLSFMV,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,710,"CWE 710 - Coding Standards Violation" no-unnecessary-bind,Do not bind `this` as the context for a function literal or lambda expression.,TSLINT1TO0VN1,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,"398, 710","CWE 398 - Indicator of Poor Code Quality CWE 710 - Coding Standards Violation" no-unnecessary-callback-wrapper,"Replaces `x => f(x)` with just `f`. To catch more cases, enable `only-arrow-functions` and `arrow-return-shorthand` too.",TSLINT1PRG22H,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,710,"CWE 710 - Coding Standards Violation" +no-unnecessary-class,Disallows classes that are not strictly necessary.,TSLINT5M2N5C,tslint,Non-SDL,Warning,Moderate,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,710,"CWE 710 - Coding Standards Violation" no-unnecessary-field-initialization,Do not unnecessarily initialize the fields of a class to values they already have.,TSLINT1IR8ES9,tslint,Non-SDL,Warning,Moderate,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,"398, 710","CWE 398 - Indicator of Poor Code Quality CWE 710 - Coding Standards Violation" no-unnecessary-initializer,Forbids a 'var'/'let' statement or destructuring initializer to be initialized to 'undefined'.,TSLINT1TVQD22,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,, @@ -172,6 +188,7 @@ CWE 710 - Coding Standards Violation" no-unnecessary-qualifier,Warns when a namespace qualifier (`A.x`) is unnecessary.,TSLINTKOT746,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,, no-unnecessary-semicolons,Remove unnecessary semicolons,TSLINTEL0RJQ,tslint,Non-SDL,Warning,Moderate,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,"398, 710","CWE 398 - Indicator of Poor Code Quality CWE 710 - Coding Standards Violation" +no-unnecessary-type-assertion,Warns if a type assertion does not change the type of an expression.,TSLINTQSR9EJ,tslint,Non-SDL,Warning,Moderate,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,710,"CWE 710 - Coding Standards Violation" no-unsafe-any,Warns when using an expression of type 'any' in a dynamic way. Uses are only allowed if they would work for `{} | null | undefined`. Type casts and tests are allowed. Expressions that work on all values (such as `"" + x`) are allowed.,TSLINTE73MOI,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,, @@ -197,23 +214,27 @@ no-with-statement,Do not use with statements. Assign the item to a new variable CWE 710 - Coding Standards Violation" non-literal-require,Detect require includes that are not for string literals,TSLINT1OU5CPO,tslint,SDL,Error,Critical,Mandatory,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,"95,676","CWE 95 - Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection') CWE 676 - Use of Potentially Dangerous Function" +number-literal-format,"Checks that decimal literals should begin with '0.' instead of just '.', and should not end with a trailing '0'.",TSLINT1KQPG76,tslint,Non-SDL,Warning,Low,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,710,"CWE 710 - Coding Standards Violation" object-literal-key-quotes,Enforces consistent object literal property quote style.,TSLINT1HEHPBE,tslint,Non-SDL,Warning,Low,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,"398, 710","CWE 398 - Indicator of Poor Code Quality CWE 710 - Coding Standards Violation" -object-literal-shorthand,Enforces use of ES6 object literal shorthand when possible.,TSLINT1QKHNQU,tslint,Non-SDL,Warning,Low,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,, +object-literal-shorthand,Enforces/disallows use of ES6 object literal shorthand.,TSLINT1QKHNQU,tslint,Non-SDL,Warning,Low,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,, one-line,Requires the specified tokens to be on the same line as the expression preceding them.,TSLINT1KDV90Q,tslint,Non-SDL,Warning,Low,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,"398, 710","CWE 398 - Indicator of Poor Code Quality CWE 710 - Coding Standards Violation" one-variable-per-declaration,Disallows multiple variable definitions in the same declaration statement.,TSLINTSULIR1,tslint,Non-SDL,Warning,Moderate,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,710,"CWE 710 - Coding Standards Violation" -ordered-imports,Requires that import statements be alphabetized.,TSLINT1FC7VGF,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,"398, 710","CWE 398 - Indicator of Poor Code Quality +ordered-imports,Requires that import statements be alphabetized and grouped.,TSLINT1FC7VGF,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,"398, 710","CWE 398 - Indicator of Poor Code Quality CWE 710 - Coding Standards Violation" possible-timing-attack,Avoid timing attacks by not making direct comaprisons to sensitive data,TSLINTHQC3QI,tslint,Non-SDL,Warning,Moderate,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,"710,749","CWE 710 - Coding Standards Violation CWE 749 - Exposed Dangerous Method or Function" prefer-array-literal,Use array literal syntax when declaring or instantiating array types.,TSLINTCHFS93,tslint,Non-SDL,Warning,Moderate,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,"398, 710","CWE 398 - Indicator of Poor Code Quality CWE 710 - Coding Standards Violation" +prefer-conditional-expression,Recommends to use a conditional expression instead of assigning to the same thing in each branch of an if statement.,TSLINT1K0I6P3,tslint,Non-SDL,Warning,Low,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,710,"CWE 710 - Coding Standards Violation" prefer-const,Requires that variable declarations use `const` instead of `let` and `var` if possible.,TSLINTGOC17R,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,"398, 705, 710","CWE 398 - Indicator of Poor Code Quality CWE 705 - Incorrect Control Flow Scoping CWE 710 - Coding Standards Violation" prefer-for-of,Recommends a 'for-of' loop over a standard 'for' loop if the index is only used to access the array being iterated.,TSLINT51MHG7,tslint,Non-SDL,Warning,Low,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,, prefer-method-signature,Prefer `foo(): void` over `foo: () => void` in interfaces and types.,TSLINT1LVIQFA,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,, +prefer-object-spread,Enforces the use of the ES2015 object spread operator over `Object.assign()` where appropriate.,TSLINT10K16KT,tslint,Non-SDL,Warning,Low,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,710,"CWE 710 - Coding Standards Violation" +prefer-switch,Prefer a `switch` statement to an `if` statement with simple `===` comparisons.,TSLINT682PUI,tslint,Non-SDL,Warning,Low,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,710,"CWE 710 - Coding Standards Violation" prefer-template,Prefer a template expression over string literal concatenation.,TSLINT1BUICJ8,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,710,"CWE 710 - Coding Standards Violation" promise-function-async,Requires any function or method that returns a promise to be marked async.,TSLINT1L1TRF8,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,, promise-must-complete,"When a Promise instance is created, then either the reject() or resolve() parameter must be called on it within all code branches in the scope.",TSLINT4SIARK,tslint,Non-SDL,Error,Critical,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,, @@ -251,6 +272,7 @@ CWE 710 - Coding Standards Violation" return-undefined,Prefer `return;` in void functions and `return undefined;` in value-returning functions.,TSLINTFU39OI,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,710,"CWE 710 - Coding Standards Violation" semicolon,Enforces consistent semicolon usage at the end of every statement.,TSLINT1L591RI,tslint,Non-SDL,Warning,Moderate,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,"398, 710","CWE 398 - Indicator of Poor Code Quality CWE 710 - Coding Standards Violation" +space-within-parens,Enforces spaces within parentheses or disallow them.,TSLINT1E89MLR,tslint,Non-SDL,Warning,Low,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,710,"CWE 710 - Coding Standards Violation" strict-boolean-expressions,"Restricts the types allowed in boolean expressions. By default only booleans are allowed. The following nodes are checked: @@ -260,9 +282,11 @@ The following nodes are checked: switch-default,Require a `default` case in all `switch` statements.,TSLINTKNBMK7,tslint,Non-SDL,Warning,Moderate,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,"398, 474, 710","CWE 398 - Indicator of Poor Code Quality CWE 474 - Use of Function with Inconsistent Implementations CWE 710 - Coding Standards Violation" +switch-final-break,Checks whether the final clause of a switch statement ends in `break;`.,TSLINTUEFK6I,tslint,Non-SDL,Warning,Low,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,710,"CWE 710 - Coding Standards Violation" trailing-comma,"Requires or disallows trailing commas in array and object literals, destructuring assignments, function typings, named imports and exports and function parameters.",TSLINT1R9EG1T,tslint,Non-SDL,Warning,Low,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,710,"CWE 710 - Coding Standards Violation" triple-equals,Requires `===` and `!==` in place of `==` and `!=`.,TSLINT1A3MGIF,tslint,Non-SDL,Warning,Moderate,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,"398, 710","CWE 398 - Indicator of Poor Code Quality CWE 710 - Coding Standards Violation" +type-literal-delimiter,Checks that type literal members are separated by semicolons. Enforces a trailing semicolon for multiline type literals.,TSLINTGHJNBL,tslint,Non-SDL,Warning,Low,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,710,"CWE 710 - Coding Standards Violation" typedef,Requires type definitions to exist.,TSLINT1GMMOCC,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,"398, 710","CWE 398 - Indicator of Poor Code Quality CWE 710 - Coding Standards Violation" typedef-whitespace,Requires or disallows whitespace for type definitions.,TSLINTGCDJL2,tslint,Non-SDL,Warning,Low,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,"398, 710","CWE 398 - Indicator of Poor Code Quality @@ -270,6 +294,7 @@ CWE 710 - Coding Standards Violation" underscore-consistent-invocation,Enforce a consistent usage of the _ functions,TSLINT5C2409,tslint,Non-SDL,Warning,Low,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,"398, 710","CWE 398 - Indicator of Poor Code Quality CWE 710 - Coding Standards Violation" unified-signatures,Warns for any two overloads that could be unified into one by using a union or an optional/rest parameter.,TSLINT1I85C1L,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,, +use-default-type-parameter,Warns if an explicitly specified type argument is the default for that type parameter.,TSLINTLMNGTP,tslint,Non-SDL,Warning,Low,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,710,"CWE 710 - Coding Standards Violation" use-isnan,Enforces use of the `isNaN()` function to check for NaN references instead of a comparison to the `NaN` constant.,TSLINTPUV7LC,tslint,Non-SDL,Error,Critical,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,398,"CWE 398 - Indicator of Poor Code Quality" use-named-parameter,"Do not reference the arguments object by numerical index; instead, use a named parameter.",TSLINTKPEHQG,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,710,"CWE 710 - Coding Standards Violation" valid-typeof,Ensures that the results of typeof are compared against a valid string.,TSLINT1IB59P1,tslint,Non-SDL,Error,Critical,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,, diff --git a/tslint.json b/tslint.json index 009ba2ef3..413c08f29 100644 --- a/tslint.json +++ b/tslint.json @@ -282,6 +282,30 @@ "check-separator", "check-type" ], - "no-useless-files": true + "no-useless-files": true, + "ban-comma-operator": true, + "binary-expression-operand-order": false, + "deprecation": false, + "encoding": true, + "no-duplicate-imports": true, + "no-duplicate-switch-case": true, + "no-implicit-dependencies": true, + "no-irregular-whitespace": true, + "no-object-literal-type-assertion": true, + "no-parameter-reassignment": false, + "no-redundant-jsdoc": true, + "no-return-await": true, + "no-submodule-imports": true, + "no-this-assignment": true, + "no-unnecessary-class": true, + "no-unnecessary-type-assertion": false, + "number-literal-format": true, + "prefer-conditional-expression": false, + "prefer-object-spread": true, + "prefer-switch": false, + "space-within-parens": true, + "switch-final-break": true, + "type-literal-delimiter": false, + "use-default-type-parameter": false } } \ No newline at end of file From 7ca996d9496ebdc1f115644b686045d736b2de4e Mon Sep 17 00:00:00 2001 From: Hamlet D'Arcy Date: Mon, 18 Dec 2017 14:11:18 +0100 Subject: [PATCH 12/19] #407 deprecate no-stateless-class rule in favor of no-unnecessary-class closes #407 --- README.md | 2 +- recommended_ruleset.js | 2 +- src/noStatelessClassRule.ts | 8 +++++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1a310064b..7b15c18f2 100644 --- a/README.md +++ b/README.md @@ -116,7 +116,7 @@ Rule Name | Description | Since `no-relative-imports` | Do not use relative paths when importing external modules or ES6 import declarations. The advantages of removing all relative paths from imports is that 1) the import name will be consistent across all files and subdirectories so searching for usages is much easier. 2) Moving source files to different folders will not require you to edit your import statements. 3) It will be possible to copy and paste import lines between files regardless of the file location. And 4) version control diffs will be simplified by having overall fewer edits to the import lines.| 2.0.5 `no-reserved-keywords` | Deprecated - This rule can be replaced with TSLint's variable-name. Do not use reserved keywords as names of local variables, fields, functions, or other identifiers. Since version 2.0.9 this rule accepts a parameter called allow-quoted-properties. If true, interface properties in quotes will be ignored. This can be a useful way to avoid verbose suppress-warning comments for generated d.ts files.| 0.0.1, 2.0.9 `no-single-line-block-comment` | Avoid single line block comments and use single line comments instead. Block comments do not nest properly and have no advantages over normal single-line comments| 2.0.10 -`no-stateless-class` | A stateless class represents a failure in the object oriented design of the system. A class without state is better modeled as a module or given some state. A stateless class is defined as a class with only static members and no parent class.| 2.0.4 +`no-stateless-class` | Deprecated - This rule can be replaced with TSLint's no-unnecessary-class. A stateless class represents a failure in the object oriented design of the system. A class without state is better modeled as a module or given some state. A stateless class is defined as a class with only static members and no parent class.| 2.0.4 `no-string-based-set-immediate` | Do not use the version of setImmediate that accepts code as a string argument. However, it is acceptable to use the version of setImmediate where a direct reference to a function is provided as the callback argument | 0.0.1 `no-string-based-set-interval` | Do not use the version of setInterval that accepts code as a string argument. However, it is acceptable to use the version of setInterval where a direct reference to a function is provided as the callback argument | 0.0.1 `no-string-based-set-timeout` | Do not use the version of setTimeout that accepts code as a string argument. However, it is acceptable to use the version of setTimeout where a direct reference to a function is provided as the callback argument | 0.0.1 diff --git a/recommended_ruleset.js b/recommended_ruleset.js index 44d02d1c4..e7200f71e 100644 --- a/recommended_ruleset.js +++ b/recommended_ruleset.js @@ -73,7 +73,6 @@ module.exports = { "no-reference-import": true, "no-regex-spaces": true, "no-sparse-arrays": true, - "no-stateless-class": true, "no-string-literal": true, "no-string-throw": true, "no-submodule-imports": true, @@ -259,6 +258,7 @@ module.exports = { "no-empty-interfaces": false, // use tslint no-empty-interface rule instead "no-missing-visibility-modifiers": false, // use tslint member-access rule instead "no-multiple-var-decl": false, // use tslint one-variable-per-declaration rule instead + "no-stateless-class": true, "no-switch-case-fall-through": false, // now supported by TypeScript compiler "typeof-compare": false, // the valid-typeof rule is currently superior to this version } diff --git a/src/noStatelessClassRule.ts b/src/noStatelessClassRule.ts index f15746aed..d370ef971 100644 --- a/src/noStatelessClassRule.ts +++ b/src/noStatelessClassRule.ts @@ -24,11 +24,17 @@ export class Rule extends Lint.Rules.AbstractRule { issueType: 'Warning', severity: 'Important', level: 'Opportunity for Excellence', - group: 'Correctness', + group: 'Deprecated', commonWeaknessEnumeration: '398, 710' }; + private static isWarningShown: boolean = false; + public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] { + if (Rule.isWarningShown === false) { + console.warn('Warning: no-stateless-class rule is deprecated. Replace your usage with the TSLint no-unnecessary-class rule.'); + Rule.isWarningShown = true; + } return this.applyWithWalker(new NoStatelessClassRuleWalker(sourceFile, this.getOptions())); } } From d0694bcfadac3e1637028004266bed090b40303f Mon Sep 17 00:00:00 2001 From: Hamlet D'Arcy Date: Mon, 18 Dec 2017 15:15:40 +0100 Subject: [PATCH 13/19] #000 un-deprate some rules function-name / variable-name rule. - we allow much more configuration than tslint. - for example, you can define a convention for privates, and a different convention for statics no-reserved-keywords / variable-name - the variable-name rule is not enough to pass the tests for no-reserved-keywords - we have more keywords and more usages missing-jsdoc / file-header - missing-jsdoc makes sure you have a top level JSDoc comment somewhere. comment could be at start of file, start of module, or start of class - file-header makes sure you have a top level text at start of file no-unnecessary-field-initialization / TSLint no-unnecessary-initializer - these are actually different rules - tslint analyzes everything *except* class members: https://github.com/palantir/tslint/blob/master/src/rules/noUnnecessaryInitializerRule.ts - our rule analyzes *only* class members prefer-array-literal / TSLint array-type - these are not drop in replacements. Our rule does a fair bit more than the base TSLint rule. prefer-type-cast / no-angle-bracket-type-assertion - These rules are actually opposites of each other - TSLint claims to be opinionated, so if they don't like a rule then they don't accept it into their ruleset - They told me they don't want this rule in the base product promise-must-complete / TSLint no-floating-promises - These rules are coded fairly differently, and are not replacements - It appears that the tslint rule does not satisfy the unit tests for promise-must-complete. - no-floating-promises requires type checking react-tsx-curly-spacing / tslint-react jsx-curly-spacing rule. - I generally don't recommend tslint-react over tslint-microsoft-contrib - There is a ton of overlap between the two projects --- README.md | 16 ++++++++-------- recommended_ruleset.js | 8 ++++---- src/functionNameRule.ts | 6 ------ src/missingJsdocRule.ts | 6 ------ src/noDuplicateCaseRule.ts | 2 +- src/noReservedKeywordsRule.ts | 6 ------ src/noUnnecessaryFieldInitializationRule.ts | 7 ------- src/noVarSelfRule.ts | 2 +- src/preferArrayLiteralRule.ts | 6 ------ src/preferTypeCastRule.ts | 7 ------- src/promiseMustCompleteRule.ts | 7 ------- src/reactTsxCurlySpacingRule.ts | 9 +-------- src/validTypeofRule.ts | 2 +- tslint.json | 6 +++--- 14 files changed, 19 insertions(+), 71 deletions(-) diff --git a/README.md b/README.md index 7b15c18f2..5a6267393 100644 --- a/README.md +++ b/README.md @@ -76,12 +76,12 @@ Rule Name | Description | Since `chai-prefer-contains-to-index-of` | Avoid Chai assertions that invoke indexOf and compare for a -1 result. It is better to use the chai .contain() assertion API instead because the failure message will be more clearer if the test fails. | 2.0.10 `chai-vague-errors` | Avoid Chai assertions that result in vague errors. For example, asserting `expect(something).to.be.true` will result in the failure message "Expected true received false". This is a vague error message that does not reveal the underlying problem. It is especially vague in TypeScript because stack trace line numbers often do not match the source code. A better pattern to follow is the xUnit Patterns [Assertion Message](http://xunitpatterns.com/Assertion%20Message.html) pattern. The previous code sample could be better written as `expect(something).to.equal(true, 'expected something to have occurred');`| 1.0 `export-name` | The name of the exported module must match the filename of the source file. This is case-sensitive but ignores file extension. Since version 1.0, this rule takes a list of regular expressions as a parameter. Any export name matching that regular expression will be ignored. For example, to allow an exported name like myChartOptions, then configure the rule like this: "export-name": \[true, "myChartOptionsg"\]| 0.0.3 -`function-name` | Deprecated - This rule can be replaced with TSLint's variable-name. Applies a naming convention to function names and method names. You can configure the naming convention by passing parameters. Please note, the private-method-regex does take precedence over the static-method-regex, so a private static method must match the private-method-regex. The default values are:
[ true, {
"method-regex": "^[a-z][\\w\\d]+$",
"private-method-regex": "^[a-z][\\w\\d]+$",
"protected-method-regex": "^[a-z][\\w\\d]+$",
"static-method-regex": "^[A-Z_\\d]+$",
"function-regex": "^[a-z][\\w\\d]+$"
}] | 2.0.7, 2.0.14 +`function-name` | Applies a naming convention to function names and method names. You can configure the naming convention by passing parameters. Please note, the private-method-regex does take precedence over the static-method-regex, so a private static method must match the private-method-regex. The default values are:
[ true, {
"method-regex": "^[a-z][\\w\\d]+$",
"private-method-regex": "^[a-z][\\w\\d]+$",
"protected-method-regex": "^[a-z][\\w\\d]+$",
"static-method-regex": "^[A-Z_\\d]+$",
"function-regex": "^[a-z][\\w\\d]+$"
}
This rule has some overlap with the [tslint variable-name rule](https://palantir.github.io/tslint/rules/variable-name/); however, the rule here is more configurable.] | 2.0.7, 2.0.14 `import-name` | The name of the imported module must match the name of the thing being imported. For example, it is valid to name imported modules the same as the module name: `import Service = require('x/y/z/Service')` and `import Service from 'x/y/z/Service'`. But it is invalid to change the name being imported, such as: `import MyCoolService = require('x/y/z/Service')` and `import MyCoolService from 'x/y/z/Service'`. Since version 2.0.9 it is possible to configure this rule with a list of exceptions. For example, to allow `underscore` to be imported as `_`, add this configuration: `'import-name': [ true, { 'underscore': '_' }]`| 2.0.5 `insecure-random` | Do not use insecure sources for random bytes. Use a secure random number generator instead. Bans all uses of Math.random and crypto.pseudoRandomBytes. Better alternatives are crypto.randomBytes and window.crypto.getRandomValues.
References:
* [CWE 330](https://cwe.mitre.org/data/definitions/330.html)
* [MDN Math.random](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random)
* [Node.js crypto.randomBytes()](http://nodejs.org/api/crypto.html#crypto_crypto_randombytes_size_callback)
* [window.crypto.getRandomValues()](https://developer.mozilla.org/en-US/docs/Web/API/window.crypto.getRandomValues)
| 2.0.11 `jquery-deferred-must-complete` | When a JQuery Deferred instance is created, then either reject() or resolve() must be called on it within all code branches in the scope. For more examples see the [feature request](https://github.com/Microsoft/tslint-microsoft-contrib/issues/26). | 1.0 `max-func-body-length` | Avoid long functions. The line count of a function body must not exceed the value configured within this rule's options.
You can setup a general max function body length applied for every function/method/arrow function e.g. \[true, 30\] or set different maximum length for every type e.g. \[true, \{ "func-body-length": 10 , "func-expression-body-length": 10 , "arrow-body-length": 5, "method-body-length": 15, "ctor-body-length": 5 \}\]. To specify a function name whose parameters you can ignore for this rule, pass a regular expression as a string(this can be useful for Mocha users to ignore the describe() function). Since version 2.0.9, you can also ignore single- and multi-line comments from the total function length, eg. \[true, \{ "ignore-comments": true \}\] | 2.0.3 -`missing-jsdoc` | Deprecated - This rule can be replaced with TSLint's file-header. All files must have a top level [JSDoc](http://usejsdoc.org/) comment. A JSDoc comment starts with /** (not one more or one less asterisk) and a JSDoc at the 'top-level' appears without leading spaces. Trailing spaces are acceptable but not recommended. | 1.0 +`missing-jsdoc` | All files must have a top level [JSDoc](http://usejsdoc.org/) comment. A JSDoc comment starts with /** (not one more or one less asterisk) and a JSDoc at the 'top-level' appears without leading spaces. Trailing spaces are acceptable but not recommended. | 1.0 `missing-optional-annotation` | Deprecated - This rule is now enforced by the TypeScript compiler. A parameter that follows one or more parameters marked as optional is not itself marked optional | 0.0.1 `mocha-avoid-only` | Do not invoke Mocha's describe.only, it.only or context.only functions. These functions are useful ways to run a single unit test or a single test case during your build, but please be careful to not push these methods calls to your version control repositiory because it will turn off any of the other tests.| 1.0 `mocha-no-side-effect-code` | All test logic in a Mocha test case should be within Mocha lifecycle method and not defined statically to execute when the module loads. Put all assignments and initialization statements in a before(), beforeEach(), beforeAll(), after(), afterEach(), afterAll(), or it() function. Code executed outside of these lifecycle methods can throw exceptions before the test runner is initialized and can result in errors or even test runner crashes. This rule can be configured with a regex to ignore certain initializations. For example, to ignore any calls to `RestDataFactory` configure the rule with: `[true, { ignore: '^RestDataFactory\\..*' }]`| 2.0.10 @@ -114,7 +114,7 @@ Rule Name | Description | Since `no-octal-literal` | Do not use octal literals or escaped octal sequences | 0.0.1 `no-regex-spaces` | Do not use multiple spaces in a regular expression literal. Similar to the [ESLint no-regex-spaces](http://eslint.org/docs/rules/no-regex-spaces.html) rule | 1.0 `no-relative-imports` | Do not use relative paths when importing external modules or ES6 import declarations. The advantages of removing all relative paths from imports is that 1) the import name will be consistent across all files and subdirectories so searching for usages is much easier. 2) Moving source files to different folders will not require you to edit your import statements. 3) It will be possible to copy and paste import lines between files regardless of the file location. And 4) version control diffs will be simplified by having overall fewer edits to the import lines.| 2.0.5 -`no-reserved-keywords` | Deprecated - This rule can be replaced with TSLint's variable-name. Do not use reserved keywords as names of local variables, fields, functions, or other identifiers. Since version 2.0.9 this rule accepts a parameter called allow-quoted-properties. If true, interface properties in quotes will be ignored. This can be a useful way to avoid verbose suppress-warning comments for generated d.ts files.| 0.0.1, 2.0.9 +`no-reserved-keywords` | Do not use reserved keywords as names of local variables, fields, functions, or other identifiers. Since version 2.0.9 this rule accepts a parameter called allow-quoted-properties. If true, interface properties in quotes will be ignored. This can be a useful way to avoid verbose suppress-warning comments for generated d.ts files.
This rule has some overlap with the [tslint variable-name rule](https://palantir.github.io/tslint/rules/variable-name/), however, the rule here finds more keywords and more usages.| 0.0.1, 2.0.9 `no-single-line-block-comment` | Avoid single line block comments and use single line comments instead. Block comments do not nest properly and have no advantages over normal single-line comments| 2.0.10 `no-stateless-class` | Deprecated - This rule can be replaced with TSLint's no-unnecessary-class. A stateless class represents a failure in the object oriented design of the system. A class without state is better modeled as a module or given some state. A stateless class is defined as a class with only static members and no parent class.| 2.0.4 `no-string-based-set-immediate` | Do not use the version of setImmediate that accepts code as a string argument. However, it is acceptable to use the version of setImmediate where a direct reference to a function is provided as the callback argument | 0.0.1 @@ -124,7 +124,7 @@ Rule Name | Description | Since `no-typeof-undefined` | Do not use the idiom `typeof x === 'undefined'`. You can safely use the simpler `x === undefined` or perhaps `x == null` if you want to check for either null or undefined. | 2.0.8 `no-unexternalized-strings` | Ensures that double quoted strings are passed to a localize call to provide proper strings for different locales. The rule can be configured using an object literal as document in the [feature request](https://github.com/Microsoft/tslint-microsoft-contrib/issues/95#issuecomment-173149989)| 2.0.1 `no-unnecessary-bind` | Do not bind 'this' as the context for a function literal or lambda expression. If you bind 'this' as the context to a function literal, then you should just use a lambda without the bind. If you bind 'this' as the context to a lambda, then you can remove the bind call because 'this' is already the context for lambdas. Works for Underscore methods as well. | 1.0 -`no-unnecessary-field-initialization` | Deprecated - This rule can be replaced with TSLint's no-unnecessary-initializer. Do not unnecessarily initialize the fields of a class to values they already have. For example, there is no need to explicitly set a field to `undefined` in the field's initialization or in the class' constructor. Also, if a field is initialized to a constant value (null, a string, a boolean, or some number) then there is no need to reassign the field to this value within the class constructor. | 2.0.9 +`no-unnecessary-field-initialization` | Do not unnecessarily initialize the fields of a class to values they already have. For example, there is no need to explicitly set a field to `undefined` in the field's initialization or in the class' constructor. Also, if a field is initialized to a constant value (null, a string, a boolean, or some number) then there is no need to reassign the field to this value within the class constructor. | 2.0.9 `no-unnecessary-local-variable` | Do not declare a variable only to return it from the function on the next line. It is always less code to simply return the expression that initializes the variable. | 2.0.4 `no-unnecessary-override` | Do not write a method that only calls super() on the parent method with the same arguments. You can safely remove methods like this and Javascript will correctly dispatch the method to the parent object. | 2.0.4 `no-unnecessary-semicolons` | Remove unnecessary semicolons | 0.0.1 @@ -134,9 +134,9 @@ Rule Name | Description | Since `no-with-statement` | Do not use with statements. Assign the item to a new variable instead | 0.0.1 `non-literal-require` | Detect `require()` function calls for something that is not a string literal. For security reasons, it is best to only require() string literals. Otherwise, it is perhaps possible for an attacker to somehow change the value and download arbitrary Javascript into your page. | 2.0.14 `possible-timing-attack` | Avoid timing attacks by not making direct string comparisons to sensitive data. Do not compare against variables named password, secret, api, apiKey, token, auth, pass, or hash. For more info see [Using Node.js Event Loop for Timing Attacks](https://snyk.io/blog/node-js-timing-attack-ccc-ctf/) | 2.0.11 -`prefer-array-literal` | Deprecated - This rule can be replaced with TSLint's array-type. Use array literal syntax when declaring or instantiating array types. For example, prefer the Javascript form of string[] to the TypeScript form Array. Prefer '[]' to 'new Array()'. Prefer '[4, 5]' to 'new Array(4, 5)'. Prefer '[undefined, undefined]' to 'new Array(4)'. Since 2.0.10, this rule can be configured to allow Array type parameters. To ignore type parameters, configure the rule with the values: `[ true, { 'allow-type-parameters': true } ]`| 1.0, 2.0.10 -`prefer-type-cast` | Deprecated - This rule can be replaced with TSLint's no-angle-bracket-type-assertion. Prefer the tradition type casts instead of the new 'as-cast' syntax. For example, prefer `myVariable` instead of `myVariable as string`. Rule ignores any file ending in .tsx. If you prefer the opposite and want to see the `as type` casts, then enable the tslint rule named 'no-angle-bracket-type-assertion'| 2.0.4 -`promise-must-complete` | Deprecated - This rule can be replaced with TSLint's no-floating-promises. When a Promise instance is created, then either the reject() or resolve() parameter must be called on it within all code branches in the scope. For more examples see the [feature request](https://github.com/Microsoft/tslint-microsoft-contrib/issues/34). | 1.0 +`prefer-array-literal` | Use array literal syntax when declaring or instantiating array types. For example, prefer the Javascript form of string[] to the TypeScript form Array. Prefer '[]' to 'new Array()'. Prefer '[4, 5]' to 'new Array(4, 5)'. Prefer '[undefined, undefined]' to 'new Array(4)'. Since 2.0.10, this rule can be configured to allow Array type parameters. To ignore type parameters, configure the rule with the values: `[ true, { 'allow-type-parameters': true } ]`
This rule has some overlap with the [TSLint array-type rule](https://palantir.github.io/tslint/rules/array-type/), however, the version here catches more instances. | 1.0, 2.0.10 +`prefer-type-cast` | Prefer the tradition type casts instead of the new 'as-cast' syntax. For example, prefer `myVariable` instead of `myVariable as string`. Rule ignores any file ending in .tsx. If you prefer the opposite and want to see the `as type` casts, then enable the tslint rule named 'no-angle-bracket-type-assertion'| 2.0.4 +`promise-must-complete` | When a Promise instance is created, then either the reject() or resolve() parameter must be called on it within all code branches in the scope. For more examples see the [feature request](https://github.com/Microsoft/tslint-microsoft-contrib/issues/34).

This rule has some overlap with the [tslint no-floating-promises rule](https://palantir.github.io/tslint/rules/no-floating-promises/), but they are substantially different. | 1.0 `react-a11y-anchors` | For accessibility of your website, anchor element link text should be at least 4 characters long. Links with the same HREF should have the same link text. Links that point to different HREFs should have different link text. Links with images and text content, the alt attribute should be unique to the text content or empty. An an anchor element's href prop value must not be just #.
References:
[WCAG Rule 38: Link text should be as least four 4 characters long](http://oaa-accessibility.org/wcag20/rule/38/)
[WCAG Rule 39: Links with the same HREF should have the same link text](http://oaa-accessibility.org/wcag20/rule/39/)
[WCAG Rule 41: Links that point to different HREFs should have different link text](http://oaa-accessibility.org/wcag20/rule/41/)
[WCAG Rule 43: Links with images and text content, the alt attribute should be unique to the text content or empty](http://oaa-accessibility.org/wcag20/rule/43/)
| 2.0.11 `react-a11y-aria-unsupported-elements` | For accessibility of your website, enforce that elements that do not support ARIA roles, states, and properties do not have those attributes. | 2.0.11 `react-a11y-event-has-role` | For accessibility of your website, Elements with event handlers must have explicit role or implicit role.
References:
[WCAG Rule 94](http://oaa-accessibility.org/wcag20/rule/94/)
[Using the button role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_button_role) | 2.0.11 @@ -155,7 +155,7 @@ Rule Name | Description | Since `react-iframe-missing-sandbox` | React iframes must specify a sandbox attribute. If specified as an empty string, this attribute enables extra restrictions on the content that can appear in the inline frame. The value of the attribute can either be an empty string (all the restrictions are applied), or a space-separated list of tokens that lift particular restrictions. You many not use both allow-scripts and allow-same-origin at the same time, as that allows the embedded document to programmatically remove the sandbox attribute in some scenarios. | 2.0.10 `react-no-dangerous-html` | Do not use React's dangerouslySetInnerHTML API. This rule finds usages of the dangerouslySetInnerHTML API (but not any JSX references). For more info see the [react-no-dangerous-html Rule wiki page](https://github.com/Microsoft/tslint-microsoft-contrib/wiki/react-no-dangerous-html-Rule). | 0.0.2 `react-this-binding-issue` | Several errors can occur when using React and React.Component subclasses. When using React components you must be careful to correctly bind the 'this' reference on any methods that you pass off to child components as callbacks. For example, it is common to define a private method called 'onClick' and then specify `onClick={this.onClick}` as a JSX attribute. If you do this then the 'this' reference will be undefined when your private method is invoked. The React documentation suggests that you bind the 'this' reference on all of your methods within the constructor: `this.onClick = this.onClick.bind(this);`. This rule will create a violation if 1) a method reference is passed to a JSX attribute without being bound in the constructor. And 2) a method is bound multiple times in the constructor. Another issue that can occur is binding the 'this' reference to a function within the render() method. For example, many people will create an anonymous lambda within the JSX attribute to avoid the 'this' binding issue: `onClick={() => { this.onClick(); }}`. The problem with this is that a new instance of an anonymous function is created every time render() is invoked. When React compares virutal DOM properties within shouldComponentUpdate() then the onClick property will look like a new property and force a re-render. You should avoid this pattern because creating function instances within render methods breaks any logic within shouldComponentUpdate() methods. This rule creates violations if 1) an anonymous function is passed as a JSX attribute. And 2) if a function instantiated in local scope is passed as a JSX attribute. This rule can be configured via the "allow-anonymous-listeners" parameter. If you want to suppress violations for the anonymous listener scenarios then configure that rule like this: `"react-this-binding-issue": [ true, { 'allow-anonymous-listeners': true } ]` | 2.0.8, 2.0.9 -`react-tsx-curly-spacing` | Deprecated - This rule can be replaced with tslint-react's jsx-curly-spacing. Consistently use spaces around the brace characters of JSX attributes.You can either allow or bad spaces between the braces and the values they enclose.

One of the two following options are required:
* "always" enforces a space inside of curly braces (default)
* "never" disallows spaces inside of curly braces

By default, braces spanning multiple lines are not allowed with either setting. If you want to allow them you can specify an additional allowMultiline property with the value false.

Examples:
* "react-tsx-curly-spacing": [true, "always"]
* "react-tsx-curly-spacing": [true, "never"]
* "react-tsx-curly-spacing": [true, "never", {"allowMultiline": false}]

References
* [eslint-plugin-react jsx-curly-spacing rule](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-spacing.md) | 2.0.14 +`react-tsx-curly-spacing` | Consistently use spaces around the brace characters of JSX attributes. You can either allow or ban spaces between the braces and the values they enclose.

One of the two following options are required:
* "always" enforces a space inside of curly braces (default)
* "never" disallows spaces inside of curly braces

By default, braces spanning multiple lines are not allowed with either setting. If you want to allow them you can specify an additional allowMultiline property with the value false.

Examples:
* "react-tsx-curly-spacing": [true, "always"]
* "react-tsx-curly-spacing": [true, "never"]
* "react-tsx-curly-spacing": [true, "never", {"allowMultiline": false}]

References
* [eslint-plugin-react jsx-curly-spacing rule](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-spacing.md)
* [tslint-react jsx-curly-spacing rule](https://github.com/palantir/tslint-react) | 2.0.14 `react-unused-props-and-state` | Remove unneeded properties defined in React Props and State interfaces. Any interface named Props or State is defined as a React interface. All fields in these interfaces must be referenced. This rule can be configured with regexes to match custom Props and State interface names.

Example for including all interfaces ending with Props or State:
*[ true, { 'props-interface-regex': 'Props$', 'state-interface-regex': 'State$' } ]* | 2.0.10 `underscore-consistent-invocation` | Enforce a consistent usage of the _ functions. By default, invoking underscore functions should begin with wrapping a variable in an underscore instance: `_(list).map(...)`. An alternative is to prefer using the static methods on the _ variable: `_.map(list, ...)`. The rule accepts single parameter called 'style' which can be the value 'static' or 'instance': `[true, { "style": "static" }]`| 2.0.10 `use-named-parameter` | Do not reference the arguments object by numerical index; instead, use a named parameter. This rule is similar to JSLint's [Use a named parameter](https://jslinterrors.com/use-a-named-parameter) rule. | 0.0.3 diff --git a/recommended_ruleset.js b/recommended_ruleset.js index e7200f71e..2d70b71bd 100644 --- a/recommended_ruleset.js +++ b/recommended_ruleset.js @@ -52,7 +52,6 @@ module.exports = { "no-constant-condition": true, "no-control-regex": true, "no-debugger": true, - "no-duplicate-case": true, "no-duplicate-super": true, "no-duplicate-switch-case": true, "no-duplicate-variable": true, @@ -97,7 +96,6 @@ module.exports = { "triple-equals": [true, "allow-null-check"], "use-isnan": true, "use-named-parameter": true, - "valid-typeof": true, /** * Code Clarity. The following rules should be turned on because they make the code @@ -155,7 +153,6 @@ module.exports = { "no-useless-files": true, "no-var-keyword": true, "no-var-requires": true, - "no-var-self": true, "no-void-expression": true, "number-literal-format": true, "object-literal-sort-keys": false, // turn object-literal-sort-keys off and sort keys in a meaningful manner @@ -215,7 +212,6 @@ module.exports = { "object-literal-key-quotes": [true, "as-needed"], "one-line": [true, "check-open-brace", "check-catch", "check-else", "check-whitespace"], "quotemark": [true, "single"], - "react-tsx-curly-spacing": true, "semicolon": [true, "always"], "space-within-parens": true, "trailing-comma": [true, {"singleline": "never", "multiline": "never"}], // forcing trailing commas for multi-line @@ -254,13 +250,17 @@ module.exports = { * Deprecated rules. The following rules are deprecated for various reasons. */ "missing-optional-annotation": false, // now supported by TypeScript compiler + "no-duplicate-case": true, "no-duplicate-parameter-names": false, // now supported by TypeScript compiler "no-empty-interfaces": false, // use tslint no-empty-interface rule instead "no-missing-visibility-modifiers": false, // use tslint member-access rule instead "no-multiple-var-decl": false, // use tslint one-variable-per-declaration rule instead "no-stateless-class": true, "no-switch-case-fall-through": false, // now supported by TypeScript compiler + "no-var-self": true, + "react-tsx-curly-spacing": true, "typeof-compare": false, // the valid-typeof rule is currently superior to this version + "valid-typeof": true, } }; diff --git a/src/functionNameRule.ts b/src/functionNameRule.ts index 5ae2b085b..c8754f70c 100644 --- a/src/functionNameRule.ts +++ b/src/functionNameRule.ts @@ -31,13 +31,7 @@ export class Rule extends Lint.Rules.AbstractRule { commonWeaknessEnumeration: '398, 710' }; - private static isWarningShown: boolean = false; - public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] { - if (Rule.isWarningShown === false) { - console.warn('Warning: function-name rule is deprecated. Replace your usage with the TSLint variable-name rule.'); - Rule.isWarningShown = true; - } return this.applyWithWalker(new FunctionNameRuleWalker(sourceFile, this.getOptions())); } } diff --git a/src/missingJsdocRule.ts b/src/missingJsdocRule.ts index 3899373ab..1d61cec71 100644 --- a/src/missingJsdocRule.ts +++ b/src/missingJsdocRule.ts @@ -26,13 +26,7 @@ export class Rule extends Lint.Rules.AbstractRule { public static FAILURE_STRING: string = 'File missing JSDoc comment at the top-level: '; - private static isWarningShown: boolean = false; - public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] { - if (Rule.isWarningShown === false) { - console.warn('Warning: missing-jsdoc rule is deprecated. Replace your usage with the TSLint file-header rule.'); - Rule.isWarningShown = true; - } return this.applyWithWalker(new MissingJSDocWalker(sourceFile, this.getOptions())); } } diff --git a/src/noDuplicateCaseRule.ts b/src/noDuplicateCaseRule.ts index 066192fe1..8f03222a1 100644 --- a/src/noDuplicateCaseRule.ts +++ b/src/noDuplicateCaseRule.ts @@ -20,7 +20,7 @@ export class Rule extends Lint.Rules.AbstractRule { issueType: 'Error', severity: 'Critical', level: 'Opportunity for Excellence', - group: 'Correctness', + group: 'Deprecated', commonWeaknessEnumeration: '398, 710' }; diff --git a/src/noReservedKeywordsRule.ts b/src/noReservedKeywordsRule.ts index 8531253bf..daee040b7 100644 --- a/src/noReservedKeywordsRule.ts +++ b/src/noReservedKeywordsRule.ts @@ -50,13 +50,7 @@ export class Rule extends Lint.Rules.AbstractRule { 'from', 'of' ]; - private static isWarningShown: boolean = false; - public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] { - if (Rule.isWarningShown === false) { - console.warn('Warning: no-reserved-keywords rule is deprecated. Replace your usage with the TSLint variable-name rule.'); - Rule.isWarningShown = true; - } const walker: Lint.RuleWalker = new BannedTermWalker( sourceFile, this.getOptions(), diff --git a/src/noUnnecessaryFieldInitializationRule.ts b/src/noUnnecessaryFieldInitializationRule.ts index 345650c0e..1e615af33 100644 --- a/src/noUnnecessaryFieldInitializationRule.ts +++ b/src/noUnnecessaryFieldInitializationRule.ts @@ -28,14 +28,7 @@ export class Rule extends Lint.Rules.AbstractRule { commonWeaknessEnumeration: '398, 710' }; - private static isWarningShown: boolean = false; - public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] { - if (Rule.isWarningShown === false) { - console.warn('Warning: no-unnecessary-field-initialization rule is deprecated. ' + - 'Replace your usage with the TSLint no-unnecessary-initializer rule.'); - Rule.isWarningShown = true; - } return this.applyWithWalker(new UnnecessaryFieldInitializationRuleWalker(sourceFile, this.getOptions())); } } diff --git a/src/noVarSelfRule.ts b/src/noVarSelfRule.ts index 2e8e3b995..172cf4baf 100644 --- a/src/noVarSelfRule.ts +++ b/src/noVarSelfRule.ts @@ -21,7 +21,7 @@ export class Rule extends Lint.Rules.AbstractRule { issueType: 'Warning', severity: 'Important', level: 'Opportunity for Excellence', - group: 'Clarity', + group: 'Deprecated', commonWeaknessEnumeration: '398, 710' }; diff --git a/src/preferArrayLiteralRule.ts b/src/preferArrayLiteralRule.ts index 9c9d61aab..4e444891c 100644 --- a/src/preferArrayLiteralRule.ts +++ b/src/preferArrayLiteralRule.ts @@ -28,13 +28,7 @@ export class Rule extends Lint.Rules.AbstractRule { public static GENERICS_FAILURE_STRING: string = 'Replace generic-typed Array with array literal: '; public static CONSTRUCTOR_FAILURE_STRING: string = 'Replace Array constructor with an array literal: '; - private static isWarningShown: boolean = false; - public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] { - if (Rule.isWarningShown === false) { - console.warn('Warning: prefer-array-literal rule is deprecated. Replace your usage with the TSLint array-type rule.'); - Rule.isWarningShown = true; - } return this.applyWithWalker(new NoGenericArrayWalker(sourceFile, this.getOptions())); } } diff --git a/src/preferTypeCastRule.ts b/src/preferTypeCastRule.ts index 8676f7fbc..381ad6d56 100644 --- a/src/preferTypeCastRule.ts +++ b/src/preferTypeCastRule.ts @@ -27,14 +27,7 @@ export class Rule extends Lint.Rules.AbstractRule { commonWeaknessEnumeration: '398, 710' }; - private static isWarningShown: boolean = false; - public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] { - if (Rule.isWarningShown === false) { - console.warn('Warning: prefer-type-cast rule is deprecated. ' + - 'Replace your usage with the TSLint no-angle-bracket-type-assertion rule.'); - Rule.isWarningShown = true; - } return this.applyWithWalker(new PreferTypeCastRuleWalker(sourceFile, this.getOptions())); } } diff --git a/src/promiseMustCompleteRule.ts b/src/promiseMustCompleteRule.ts index 952cdd6d3..02e43838d 100644 --- a/src/promiseMustCompleteRule.ts +++ b/src/promiseMustCompleteRule.ts @@ -28,14 +28,7 @@ export class Rule extends Lint.Rules.AbstractRule { public static FAILURE_STRING: string = 'A Promise was found that appears to not have resolve or reject invoked on all code paths'; - private static isWarningShown: boolean = false; - public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] { - if (Rule.isWarningShown === false) { - console.warn('Warning: promise-must-complete rule is deprecated. ' + - 'Replace your usage with the TSLint no-floating-promises rule.'); - Rule.isWarningShown = true; - } return this.applyWithWalker(new PromiseAnalyzer(sourceFile, this.getOptions())); } } diff --git a/src/reactTsxCurlySpacingRule.ts b/src/reactTsxCurlySpacingRule.ts index 1aa53f11c..c83033486 100644 --- a/src/reactTsxCurlySpacingRule.ts +++ b/src/reactTsxCurlySpacingRule.ts @@ -20,17 +20,10 @@ export class Rule extends Lint.Rules.AbstractRule { issueType: 'Warning', severity: 'Low', level: 'Opportunity for Excellence', - group: 'Whitespace' + group: 'Deprecated' }; - private static isWarningShown: boolean = false; - public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] { - if (Rule.isWarningShown === false) { - console.warn('Warning: react-tsx-curly-spacing rule is deprecated. ' + - 'Replace your usage with the tslint-react jsx-curly-spacing rule.'); - Rule.isWarningShown = true; - } return this.applyWithWalker(new TsxCurlySpacingWalker(sourceFile, this.getOptions())); } } diff --git a/src/validTypeofRule.ts b/src/validTypeofRule.ts index dfb899b6c..c1424751d 100644 --- a/src/validTypeofRule.ts +++ b/src/validTypeofRule.ts @@ -20,7 +20,7 @@ export class Rule extends Lint.Rules.AbstractRule { issueType: 'Error', severity: 'Critical', level: 'Opportunity for Excellence', - group: 'Correctness' + group: 'Deprecated' }; public static FAILURE_STRING: string = 'Invalid comparison in typeof. Did you mean '; diff --git a/tslint.json b/tslint.json index 413c08f29..da8a8df69 100644 --- a/tslint.json +++ b/tslint.json @@ -155,7 +155,7 @@ "no-shadowed-variable": true, "no-single-line-block-comment": true, "no-sparse-arrays": true, - "no-stateless-class": true, + "no-stateless-class": false, "no-string-based-set-immediate": true, "no-string-based-set-interval": true, "no-string-based-set-timeout": true, @@ -181,7 +181,7 @@ "no-use-before-declare": true, "no-var-keyword": true, "no-var-requires": true, - "no-var-self": true, + "no-var-self": false, "no-void-expression": false, "no-with-statement": true, "non-literal-require": true, @@ -272,7 +272,7 @@ "unified-signatures": true, "use-isnan": true, "use-named-parameter": true, - "valid-typeof": true, + "valid-typeof": false, "variable-name": true, "whitespace": [ true, From 4202e8b6c10b52c51ab40c906cd25e982a493b8b Mon Sep 17 00:00:00 2001 From: Hamlet D'Arcy Date: Sun, 14 Jan 2018 19:13:20 +0100 Subject: [PATCH 14/19] preparing release branch --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5a6267393..afb99c73d 100644 --- a/README.md +++ b/README.md @@ -8,13 +8,13 @@ tslint-microsoft-contrib A set of [TSLint](https://github.com/palantir/tslint) rules used on some Microsoft projects. -Version 5.0.1 (Stable) +Version 5.0.2 (Stable) ------------- The project has been in use for several years on multiple projects. Please report any bugs or false positives you might find! See our [Release Notes](https://github.com/Microsoft/tslint-microsoft-contrib/wiki/Release-Notes) to find the latest new rules. -Version 5.0.2 (In-Development) +Version 5.0.3 (In-Development) ------------- The [Latest Development Version](https://github.com/Microsoft/tslint-microsoft-contrib/tree/releases) is available online. To use the nightly build set your npm version to `git://github.com/Microsoft/tslint-microsoft-contrib.git#releases` @@ -26,8 +26,7 @@ Installation Alternately, you can download the files directly from GitHub: -* [5.0.1](https://github.com/Microsoft/tslint-microsoft-contrib/tree/npm-5.0.1) -* [4.0.1](https://github.com/Microsoft/tslint-microsoft-contrib/tree/npm-4.0.1) +* [5.0.2](https://github.com/Microsoft/tslint-microsoft-contrib/tree/npm-5.0.2) #### TSLint and corresponding tslint-microsoft-contrib version From 96280b42b75dc723b323f055deeb02c1ec2311e6 Mon Sep 17 00:00:00 2001 From: Hamlet D'Arcy Date: Sun, 14 Jan 2018 19:27:33 +0100 Subject: [PATCH 15/19] bumping to next dev version (5.0.3) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5ba65097c..c3b1d6fb2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tslint-microsoft-contrib", - "version": "5.0.2", + "version": "5.0.3", "description": "TSLint Rules for Microsoft", "repository": { "type": "git", From ed832e755845240d71a400b6a75e5251be7777c4 Mon Sep 17 00:00:00 2001 From: Caghan Demirci Date: Mon, 22 Jan 2018 01:10:59 -0800 Subject: [PATCH 16/19] #411 Removed default configuration of deprecated rules. Restored configuration of deprecated parameters and set them to false. closes #411 --- additional_rule_metadata.json | 2 +- recommended_ruleset.js | 12 ++++++------ src/noDuplicateCaseRule.ts | 1 + src/noStatelessClassRule.ts | 1 + src/noVarSelfRule.ts | 1 + src/reactTsxCurlySpacingRule.ts | 1 + src/validTypeofRule.ts | 1 + tslint.json | 18 +++++++++--------- 8 files changed, 21 insertions(+), 16 deletions(-) diff --git a/additional_rule_metadata.json b/additional_rule_metadata.json index 321c9504a..c81f1b9fe 100644 --- a/additional_rule_metadata.json +++ b/additional_rule_metadata.json @@ -653,7 +653,7 @@ "issueType": "Warning", "severity": "Low", "group": "Clarity", - "recommendation": "[true, 3], // we generally recommend making one public class per file ", + "recommendation": "[true, 3], // we generally recommend making one public class per file", "level": "Opportunity for Excellence" }, "no-parameter-properties": { diff --git a/recommended_ruleset.js b/recommended_ruleset.js index 2d70b71bd..f8424a7a0 100644 --- a/recommended_ruleset.js +++ b/recommended_ruleset.js @@ -117,7 +117,7 @@ module.exports = { "import-name": true, "interface-name": true, "jsdoc-format": true, - "max-classes-per-file": [true, 3], // we generally recommend making one public class per file + "max-classes-per-file": [true, 3], // we generally recommend making one public class per file "max-file-line-count": true, "max-func-body-length": [true, 100, {"ignore-parameters-to-function-regex": "describe"}], "max-line-length": [true, 140], @@ -250,17 +250,17 @@ module.exports = { * Deprecated rules. The following rules are deprecated for various reasons. */ "missing-optional-annotation": false, // now supported by TypeScript compiler - "no-duplicate-case": true, + "no-duplicate-case": false, "no-duplicate-parameter-names": false, // now supported by TypeScript compiler "no-empty-interfaces": false, // use tslint no-empty-interface rule instead "no-missing-visibility-modifiers": false, // use tslint member-access rule instead "no-multiple-var-decl": false, // use tslint one-variable-per-declaration rule instead - "no-stateless-class": true, + "no-stateless-class": false, "no-switch-case-fall-through": false, // now supported by TypeScript compiler - "no-var-self": true, - "react-tsx-curly-spacing": true, + "no-var-self": false, + "react-tsx-curly-spacing": false, "typeof-compare": false, // the valid-typeof rule is currently superior to this version - "valid-typeof": true, + "valid-typeof": false, } }; diff --git a/src/noDuplicateCaseRule.ts b/src/noDuplicateCaseRule.ts index 8f03222a1..2c141ee5a 100644 --- a/src/noDuplicateCaseRule.ts +++ b/src/noDuplicateCaseRule.ts @@ -20,6 +20,7 @@ export class Rule extends Lint.Rules.AbstractRule { issueType: 'Error', severity: 'Critical', level: 'Opportunity for Excellence', + recommendation: 'false,', group: 'Deprecated', commonWeaknessEnumeration: '398, 710' }; diff --git a/src/noStatelessClassRule.ts b/src/noStatelessClassRule.ts index d370ef971..bb9cd7cf3 100644 --- a/src/noStatelessClassRule.ts +++ b/src/noStatelessClassRule.ts @@ -24,6 +24,7 @@ export class Rule extends Lint.Rules.AbstractRule { issueType: 'Warning', severity: 'Important', level: 'Opportunity for Excellence', + recommendation: 'false,', group: 'Deprecated', commonWeaknessEnumeration: '398, 710' }; diff --git a/src/noVarSelfRule.ts b/src/noVarSelfRule.ts index 172cf4baf..a6e66b31d 100644 --- a/src/noVarSelfRule.ts +++ b/src/noVarSelfRule.ts @@ -22,6 +22,7 @@ export class Rule extends Lint.Rules.AbstractRule { severity: 'Important', level: 'Opportunity for Excellence', group: 'Deprecated', + recommendation: 'false,', commonWeaknessEnumeration: '398, 710' }; diff --git a/src/reactTsxCurlySpacingRule.ts b/src/reactTsxCurlySpacingRule.ts index c83033486..aec7af760 100644 --- a/src/reactTsxCurlySpacingRule.ts +++ b/src/reactTsxCurlySpacingRule.ts @@ -20,6 +20,7 @@ export class Rule extends Lint.Rules.AbstractRule { issueType: 'Warning', severity: 'Low', level: 'Opportunity for Excellence', + recommendation: 'false,', group: 'Deprecated' }; diff --git a/src/validTypeofRule.ts b/src/validTypeofRule.ts index c1424751d..ac6f5ef87 100644 --- a/src/validTypeofRule.ts +++ b/src/validTypeofRule.ts @@ -20,6 +20,7 @@ export class Rule extends Lint.Rules.AbstractRule { issueType: 'Error', severity: 'Critical', level: 'Opportunity for Excellence', + recommendation: 'false,', group: 'Deprecated' }; diff --git a/tslint.json b/tslint.json index da8a8df69..ee0b14c14 100644 --- a/tslint.json +++ b/tslint.json @@ -72,7 +72,7 @@ false ], "missing-jsdoc": true, - "missing-optional-annotation": true, + "missing-optional-annotation": false, "mocha-avoid-only": true, "mocha-no-side-effect-code": true, "mocha-unneeded-done": true, @@ -107,13 +107,13 @@ "no-disable-auto-sanitization": true, "no-document-domain": true, "no-document-write": true, - "no-duplicate-case": true, - "no-duplicate-parameter-names": true, + "no-duplicate-case": false, + "no-duplicate-parameter-names": false, "no-duplicate-super": true, "no-duplicate-variable": true, "no-empty": true, "no-empty-interface": true, - "no-empty-interfaces": true, + "no-empty-interfaces": false, "no-empty-line-after-opening-brace": false, "no-eval": true, "no-exec-script": true, @@ -139,10 +139,10 @@ "no-jquery-raw-elements": true, "no-magic-numbers": false, "no-mergeable-namespace": false, - "no-missing-visibility-modifiers": true, + "no-missing-visibility-modifiers": false, "no-misused-new": true, "no-multiline-string": [ true ], - "no-multiple-var-decl": true, + "no-multiple-var-decl": false, "no-namespace": false, "no-null-keyword": false, "no-octal-literal": true, @@ -162,7 +162,7 @@ "no-string-literal": true, "no-string-throw": true, "no-suspicious-comment": true, - "no-switch-case-fall-through": true, + "no-switch-case-fall-through": false, "no-trailing-whitespace": true, "no-typeof-undefined": true, "no-unbound-method": false, @@ -237,7 +237,7 @@ "react-iframe-missing-sandbox": true, "react-no-dangerous-html": true, "react-this-binding-issue": true, - "react-tsx-curly-spacing": true, + "react-tsx-curly-spacing": false, "react-unused-props-and-state": true, "restrict-plus-operands": false, "semicolon": [ @@ -267,7 +267,7 @@ "typedef-whitespace": [ false ], - "typeof-compare": true, + "typeof-compare": false, "underscore-consistent-invocation": true, "unified-signatures": true, "use-isnan": true, From b81ad57cb265b4e502c61ac6849b7041d5f3a30e Mon Sep 17 00:00:00 2001 From: Garrow Bedrossian Date: Wed, 31 Jan 2018 21:26:28 -0500 Subject: [PATCH 17/19] #414 fix type error in react-ally-img-has-alt rule Add warning throwing test for undefined roles Coerce possibly undefined role attribute to string closes #414 closes #390 closes #410 --- src/reactA11yImgHasAltRule.ts | 2 +- src/tests/reactA11yImgHasAltRuleTests.ts | 5 +++++ ...mentHasNonEmptyAltValueAndUndefinedPresentationRole.tsx | 7 +++++++ 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 test-data/a11yImgHasAlt/DefaltTests/PassingTestInputs/ImgElementHasNonEmptyAltValueAndUndefinedPresentationRole.tsx diff --git a/src/reactA11yImgHasAltRule.ts b/src/reactA11yImgHasAltRule.ts index 6aaf4ef46..e0fbb95b9 100644 --- a/src/reactA11yImgHasAltRule.ts +++ b/src/reactA11yImgHasAltRule.ts @@ -100,7 +100,7 @@ class ImgHasAltWalker extends Lint.RuleWalker { } else { const roleAttribute: ts.JsxAttribute = attributes[ROLE_STRING]; const roleAttributeValue: string = roleAttribute ? getStringLiteral(roleAttribute) : ''; - const isPresentationRole: boolean = !!roleAttributeValue.toLowerCase().match(/\bpresentation\b/); + const isPresentationRole: boolean = !!String(roleAttributeValue).toLowerCase().match(/\bpresentation\b/); const isEmptyAlt: boolean = isEmpty(altAttribute) || getStringLiteral(altAttribute) === ''; const allowNonEmptyAltWithRolePresentation: boolean = options.length > 1 ? options[1].allowNonEmptyAltWithRolePresentation diff --git a/src/tests/reactA11yImgHasAltRuleTests.ts b/src/tests/reactA11yImgHasAltRuleTests.ts index 0085702db..454cbc2ac 100644 --- a/src/tests/reactA11yImgHasAltRuleTests.ts +++ b/src/tests/reactA11yImgHasAltRuleTests.ts @@ -46,6 +46,11 @@ describe('reactA11yImgHasAlt', () => { TestHelper.assertNoViolation(ruleName, fileName); }); + it('when the img element has non-empty alt value and undefined presentation role', () => { + const fileName: string = fileDirectory + 'ImgElementHasNonEmptyAltValueAndUndefinedPresentationRole.tsx'; + TestHelper.assertNoViolation(ruleName, fileName); + }); + it('when the img element has non-empty alt value and presentation role when option is enabled', () => { const fileName: string = fileDirectory + 'ImgElementHasNonEmptyAltValueAndPresentationRole.tsx'; const ruleOptions: any[] = [[], { allowNonEmptyAltWithRolePresentation: true }]; diff --git a/test-data/a11yImgHasAlt/DefaltTests/PassingTestInputs/ImgElementHasNonEmptyAltValueAndUndefinedPresentationRole.tsx b/test-data/a11yImgHasAlt/DefaltTests/PassingTestInputs/ImgElementHasNonEmptyAltValueAndUndefinedPresentationRole.tsx new file mode 100644 index 000000000..1ccf19883 --- /dev/null +++ b/test-data/a11yImgHasAlt/DefaltTests/PassingTestInputs/ImgElementHasNonEmptyAltValueAndUndefinedPresentationRole.tsx @@ -0,0 +1,7 @@ +import React = require('react'); + +let validAltValue; +const a = validAltValue +const b = {validAltValue} +const c = {'validAltValue'} +const d = {validAltValue From 9f1907e6eef9bc0de33313d7d260084d0aa34ec9 Mon Sep 17 00:00:00 2001 From: Hamlet D'Arcy Date: Tue, 13 Feb 2018 21:16:42 +0100 Subject: [PATCH 18/19] 5.0.3 - update readme.md for release --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index afb99c73d..9000fbf11 100644 --- a/README.md +++ b/README.md @@ -8,13 +8,13 @@ tslint-microsoft-contrib A set of [TSLint](https://github.com/palantir/tslint) rules used on some Microsoft projects. -Version 5.0.2 (Stable) +Version 5.0.3 (Stable) ------------- The project has been in use for several years on multiple projects. Please report any bugs or false positives you might find! See our [Release Notes](https://github.com/Microsoft/tslint-microsoft-contrib/wiki/Release-Notes) to find the latest new rules. -Version 5.0.3 (In-Development) +Version 5.0.4 (In-Development) ------------- The [Latest Development Version](https://github.com/Microsoft/tslint-microsoft-contrib/tree/releases) is available online. To use the nightly build set your npm version to `git://github.com/Microsoft/tslint-microsoft-contrib.git#releases` @@ -26,7 +26,7 @@ Installation Alternately, you can download the files directly from GitHub: -* [5.0.2](https://github.com/Microsoft/tslint-microsoft-contrib/tree/npm-5.0.2) +* [5.0.3](https://github.com/Microsoft/tslint-microsoft-contrib/tree/npm-5.0.3) #### TSLint and corresponding tslint-microsoft-contrib version From 307abc4f25501d01c7aec08c8514f0255d53f241 Mon Sep 17 00:00:00 2001 From: Hamlet D'Arcy Date: Tue, 13 Feb 2018 21:19:38 +0100 Subject: [PATCH 19/19] 5.0.4 - increased version number after release --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c3b1d6fb2..afcea53c3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tslint-microsoft-contrib", - "version": "5.0.3", + "version": "5.0.4", "description": "TSLint Rules for Microsoft", "repository": { "type": "git",