= g;
- return ' Body Background Color: ' + this.bgColor + ', Foo Datum: ' + d.foo + '
'; // this context HTMLBodyElement, datum BodyDatum
+ return ` Body Background Color: ${this.bgColor}, Foo Datum: ${d.foo}
`; // this context HTMLBodyElement, datum BodyDatum
});
// ---------------------------------------------------------------------------------------
@@ -993,7 +993,7 @@ let customListener: (this: HTMLBodyElement, finalOpponent: string) => string;
customListener = finalOpponent => {
const e = d3Selection.event;
- return e.team + ' defeated ' + finalOpponent + ' in the EURO 2016 Cup. Who would have thought!!!';
+ return `${e.team} defeated ${finalOpponent} in the EURO 2016 Cup. Who would have thought!!!`;
};
const resultText: string = d3Selection.customEvent(successEvent, customListener, body.node(), 'Wales');
diff --git a/types/d3-selection/tslint.json b/types/d3-selection/tslint.json
index 08b1465cd6..b8825c1674 100644
--- a/types/d3-selection/tslint.json
+++ b/types/d3-selection/tslint.json
@@ -1,6 +1,8 @@
{
"extends": "dtslint/dt.json",
"rules": {
+ // TODO
+ "no-this-assignment": false,
"unified-signatures": false
}
}
diff --git a/types/d3-shape/tslint.json b/types/d3-shape/tslint.json
index 604d5950cf..108ab49c45 100644
--- a/types/d3-shape/tslint.json
+++ b/types/d3-shape/tslint.json
@@ -1,6 +1,8 @@
{
"extends": "dtslint/dt.json",
"rules": {
+ // TODO
+ "no-this-assignment": false,
"unified-signatures": false,
"callable-types": false
}
diff --git a/types/d3-transition/tslint.json b/types/d3-transition/tslint.json
index 08b1465cd6..b8825c1674 100644
--- a/types/d3-transition/tslint.json
+++ b/types/d3-transition/tslint.json
@@ -1,6 +1,8 @@
{
"extends": "dtslint/dt.json",
"rules": {
+ // TODO
+ "no-this-assignment": false,
"unified-signatures": false
}
}
diff --git a/types/d3-zoom/tslint.json b/types/d3-zoom/tslint.json
index 08b1465cd6..b8825c1674 100644
--- a/types/d3-zoom/tslint.json
+++ b/types/d3-zoom/tslint.json
@@ -1,6 +1,8 @@
{
"extends": "dtslint/dt.json",
"rules": {
+ // TODO
+ "no-this-assignment": false,
"unified-signatures": false
}
}
diff --git a/types/del/v2/tslint.json b/types/del/v2/tslint.json
index 3db14f85ea..65c83fb1e3 100644
--- a/types/del/v2/tslint.json
+++ b/types/del/v2/tslint.json
@@ -1 +1,6 @@
-{ "extends": "dtslint/dt.json" }
+{
+ "extends": "dtslint/dt.json",
+ "rules": {
+ "dt-header": false
+ }
+}
diff --git a/types/destroy/destroy-tests.ts b/types/destroy/destroy-tests.ts
new file mode 100644
index 0000000000..15dbe62e32
--- /dev/null
+++ b/types/destroy/destroy-tests.ts
@@ -0,0 +1,9 @@
+import destroy = require('destroy');
+import * as fs from 'fs';
+
+const stream = fs.createReadStream('package.json');
+
+// $ExpectType ReadStream
+destroy(stream);
+// $ExpectType WriteStream
+destroy(process.stderr);
diff --git a/types/destroy/index.d.ts b/types/destroy/index.d.ts
new file mode 100644
index 0000000000..7427655ace
--- /dev/null
+++ b/types/destroy/index.d.ts
@@ -0,0 +1,11 @@
+// Type definitions for destroy 1.0
+// Project: https://github.com/stream-utils/destroy
+// Definitions by: BendingBender
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+///
+import { Stream } from 'stream';
+
+export = destroy;
+
+declare function destroy(stream: T): T;
diff --git a/types/destroy/tsconfig.json b/types/destroy/tsconfig.json
new file mode 100644
index 0000000000..197ac0c669
--- /dev/null
+++ b/types/destroy/tsconfig.json
@@ -0,0 +1,22 @@
+{
+ "compilerOptions": {
+ "module": "commonjs",
+ "lib": [
+ "es6"
+ ],
+ "noImplicitAny": true,
+ "noImplicitThis": true,
+ "strictNullChecks": true,
+ "baseUrl": "../",
+ "typeRoots": [
+ "../"
+ ],
+ "types": [],
+ "noEmit": true,
+ "forceConsistentCasingInFileNames": true
+ },
+ "files": [
+ "index.d.ts",
+ "destroy-tests.ts"
+ ]
+}
diff --git a/types/destroy/tslint.json b/types/destroy/tslint.json
new file mode 100644
index 0000000000..3db14f85ea
--- /dev/null
+++ b/types/destroy/tslint.json
@@ -0,0 +1 @@
+{ "extends": "dtslint/dt.json" }
diff --git a/types/detect-indent/v0/detect-indent-tests.ts b/types/detect-indent/v0/detect-indent-tests.ts
index 2969136fc8..4bb8171494 100644
--- a/types/detect-indent/v0/detect-indent-tests.ts
+++ b/types/detect-indent/v0/detect-indent-tests.ts
@@ -1,6 +1,6 @@
import di = require('detect-indent');
-let str: string = '';
+let str = '';
str = di(str);
str = di(str, str);
diff --git a/types/di-lite/di-lite-tests.ts b/types/di-lite/di-lite-tests.ts
index efe45738ae..37d220fc6d 100644
--- a/types/di-lite/di-lite-tests.ts
+++ b/types/di-lite/di-lite-tests.ts
@@ -7,13 +7,13 @@ interface Dependency {
function doTest(test: (ctx: any, ...obj: Dependency[]) => void) {
// create di context
var ctx = di.createContext(),
- A: Dependency = () => {
- this.dependencies = "b, c";
+ A: Dependency = {
+ dependencies: "b, c",
},
- B: Dependency = () => {
- this.dependencies = "c";
+ B: Dependency = {
+ dependencies: "c",
},
- C: Dependency = () => {};
+ C: Dependency = {};
// register a class with an unique name
ctx.register("a", A);
diff --git a/types/diff/diff-tests.ts b/types/diff/diff-tests.ts
index 0d49147c33..e787c44f48 100644
--- a/types/diff/diff-tests.ts
+++ b/types/diff/diff-tests.ts
@@ -7,7 +7,7 @@ let diff = jsdiff.diffChars(one, other);
diff.forEach(part => {
const mark = part.added ? '+' :
part.removed ? '-' : ' ';
- console.log(mark + " " + part.value);
+ console.log(`${mark} ${part.value}`);
});
// --------------------------
diff --git a/types/documentdb-server/documentdb-server-tests.ts b/types/documentdb-server/documentdb-server-tests.ts
index aa5c45b73d..d4e8e7f40c 100644
--- a/types/documentdb-server/documentdb-server-tests.ts
+++ b/types/documentdb-server/documentdb-server-tests.ts
@@ -20,10 +20,12 @@ function filter() {
.value();
if (!result.isAccepted) throw new Error("The call was not accepted");
// Example 3: get document (person) with id = 1 and delete it.
- var result: IQueryResponse = __.filter(function (doc: any) { return doc.id === 1; }, function (err: IFeedCallbackError, feed: Array, options: IFeedCallbackOptions) {
- if (err) throw err;
- if (!__.deleteDocument(feed[0].getSelfLink())) throw new Error("deleteDocument was not accepted");
- });
+ var result: IQueryResponse = __.filter(
+ function (doc: any) { return doc.id === 1; },
+ function (err: IFeedCallbackError, feed: Array, options: IFeedCallbackOptions) {
+ if (err) throw err;
+ if (!__.deleteDocument(feed[0].getSelfLink())) throw new Error("deleteDocument was not accepted");
+ });
if (!result.isAccepted) throw new Error("The call was not accepted");
}
function flatten() {
@@ -103,7 +105,7 @@ function value() {
// Samples taken from https://github.com/Azure/azure-documentdb-js-server/tree/master/samples
/**
* This script called as stored procedure to import lots of documents in one batch.
-* The script sets response body to the number of docs imported and is called multiple times
+* The script sets response body to the number of docs imported and is called multiple times
* by the client until total number of docs desired by the client is imported.
* @param {Object[]} docs - Array of documents to import.
*/
@@ -127,7 +129,7 @@ function bulkImport(docs: Array