mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-07 00:07:07 +00:00
Explicit mentioning of support for "import-" and "require-style" by providing more tests, as per discussion (https://github.com/DefinitelyTyped/DefinitelyTyped/pull/30669#discussion_r238432884)
This commit is contained in:
@@ -1,54 +1,2 @@
|
||||
import ListStream from "list-stream";
|
||||
|
||||
let chunk: any = "chunk";
|
||||
let listStream: ListStream;
|
||||
let num = 1;
|
||||
|
||||
listStream = ListStream((err: Error, data: any[]) => {
|
||||
if (err) { throw err; }
|
||||
console.log(data.length);
|
||||
for (const date of data) {
|
||||
console.log(date);
|
||||
}
|
||||
});
|
||||
listStream = ListStream({ objectMode: true }, (err: Error, data: any[]) => {
|
||||
if (err) { throw err; }
|
||||
console.log(data.length);
|
||||
for (const date of data) {
|
||||
console.log(date);
|
||||
}
|
||||
});
|
||||
listStream = new ListStream((err: Error, data: any[]) => {
|
||||
if (err) { throw err; }
|
||||
console.log(data.length);
|
||||
for (const date of data) {
|
||||
console.log(date);
|
||||
}
|
||||
});
|
||||
listStream = new ListStream({ objectMode: true }, (err: Error, data: any[]) => {
|
||||
if (err) { throw err; }
|
||||
console.log(data.length);
|
||||
for (const date of data) {
|
||||
console.log(date);
|
||||
}
|
||||
});
|
||||
listStream = ListStream.obj((err: Error, data: any[]) => {
|
||||
if (err) { throw err; }
|
||||
console.log(data.length);
|
||||
for (const date of data) {
|
||||
console.log(date);
|
||||
}
|
||||
});
|
||||
|
||||
listStream = ListStream.obj();
|
||||
listStream.write({ key: "value" });
|
||||
|
||||
listStream.append(chunk);
|
||||
|
||||
listStream = listStream.duplicate();
|
||||
|
||||
listStream.end();
|
||||
|
||||
chunk = listStream.get(num);
|
||||
|
||||
num = listStream.length;
|
||||
import "./tests/import-tests";
|
||||
import "./tests/require-tests";
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
import ListStream from "list-stream";
|
||||
|
||||
let chunk: any = "chunk";
|
||||
let listStream: ListStream;
|
||||
let num = 1;
|
||||
|
||||
listStream = ListStream((err: Error, data: any[]) => {
|
||||
if (err) { throw err; }
|
||||
console.log(data.length);
|
||||
for (const date of data) {
|
||||
console.log(date);
|
||||
}
|
||||
});
|
||||
listStream = ListStream({ objectMode: true }, (err: Error, data: any[]) => {
|
||||
if (err) { throw err; }
|
||||
console.log(data.length);
|
||||
for (const date of data) {
|
||||
console.log(date);
|
||||
}
|
||||
});
|
||||
listStream = new ListStream((err: Error, data: any[]) => {
|
||||
if (err) { throw err; }
|
||||
console.log(data.length);
|
||||
for (const date of data) {
|
||||
console.log(date);
|
||||
}
|
||||
});
|
||||
listStream = new ListStream({ objectMode: true }, (err: Error, data: any[]) => {
|
||||
if (err) { throw err; }
|
||||
console.log(data.length);
|
||||
for (const date of data) {
|
||||
console.log(date);
|
||||
}
|
||||
});
|
||||
listStream = ListStream.obj((err: Error, data: any[]) => {
|
||||
if (err) { throw err; }
|
||||
console.log(data.length);
|
||||
for (const date of data) {
|
||||
console.log(date);
|
||||
}
|
||||
});
|
||||
|
||||
listStream = ListStream.obj();
|
||||
listStream.write({ key: "value" });
|
||||
|
||||
listStream.append(chunk);
|
||||
|
||||
listStream = listStream.duplicate();
|
||||
|
||||
listStream.end();
|
||||
|
||||
chunk = listStream.get(num);
|
||||
|
||||
num = listStream.length;
|
||||
@@ -0,0 +1,54 @@
|
||||
import ListStream = require("list-stream");
|
||||
|
||||
let chunk: any = "chunk";
|
||||
let listStream: ListStream;
|
||||
let num = 1;
|
||||
|
||||
listStream = ListStream((err: Error, data: any[]) => {
|
||||
if (err) { throw err; }
|
||||
console.log(data.length);
|
||||
for (const date of data) {
|
||||
console.log(date);
|
||||
}
|
||||
});
|
||||
listStream = ListStream({ objectMode: true }, (err: Error, data: any[]) => {
|
||||
if (err) { throw err; }
|
||||
console.log(data.length);
|
||||
for (const date of data) {
|
||||
console.log(date);
|
||||
}
|
||||
});
|
||||
listStream = new ListStream((err: Error, data: any[]) => {
|
||||
if (err) { throw err; }
|
||||
console.log(data.length);
|
||||
for (const date of data) {
|
||||
console.log(date);
|
||||
}
|
||||
});
|
||||
listStream = new ListStream({ objectMode: true }, (err: Error, data: any[]) => {
|
||||
if (err) { throw err; }
|
||||
console.log(data.length);
|
||||
for (const date of data) {
|
||||
console.log(date);
|
||||
}
|
||||
});
|
||||
listStream = ListStream.obj((err: Error, data: any[]) => {
|
||||
if (err) { throw err; }
|
||||
console.log(data.length);
|
||||
for (const date of data) {
|
||||
console.log(date);
|
||||
}
|
||||
});
|
||||
|
||||
listStream = ListStream.obj();
|
||||
listStream.write({ key: "value" });
|
||||
|
||||
listStream.append(chunk);
|
||||
|
||||
listStream = listStream.duplicate();
|
||||
|
||||
listStream.end();
|
||||
|
||||
chunk = listStream.get(num);
|
||||
|
||||
num = listStream.length;
|
||||
Reference in New Issue
Block a user