-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpeek.ts
38 lines (31 loc) · 816 Bytes
/
peek.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
* Copyright (C) Oliver Lenehan (sunsetkookaburra), 2022 */
// interface PeekSource<T> {
// peekable: PeekableStream<T>
// }
// export class PeekableByteStream extends ReadableStream {
// constructor() {
// super({
// type:"bytes",
// pull: (controller) => {
// controller.byobRequest.
// },
// });
// }
// }
function validate(value: any): asserts value is number {
if (value["rick"] !== "roll") throw Error;
}
var x: any = "abc";
validate(x);
x
class Abc {
constructor(json: Array<Object>) {
json[0].
json[0]
for (const value of json) {
}
}
}