_id stringlengths 21 254 | text stringlengths 1 93.7k | metadata dict |
|---|---|---|
TypeScript/tests/cases/conformance/statements/for-ofStatements/ES5For-of1.ts_0_73 | //@sourcemap: true
for (var v of ['a', 'b', 'c']) {
console.log(v);
} | {
"end_byte": 73,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-ofStatements/ES5For-of1.ts"
} |
TypeScript/tests/cases/conformance/statements/for-ofStatements/ES5For-of16.ts_0_90 | for (let v of []) {
v;
for (let v of []) {
var x = v;
v++;
}
} | {
"end_byte": 90,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-ofStatements/ES5For-of16.ts"
} |
TypeScript/tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck12.ts_0_37 | //@target: ES5
for (const v of 0) { } | {
"end_byte": 37,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck12.ts"
} |
TypeScript/tests/cases/conformance/statements/for-ofStatements/ES5For-of36.ts_0_99 | //@sourcemap: true
//@downlevelIteration: true
for (let [a = 0, b = 1] of [2, 3]) {
a;
b;
} | {
"end_byte": 99,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-ofStatements/ES5For-of36.ts"
} |
TypeScript/tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck2.ts_0_40 | //@target: ES5
for (var v of [true]) { } | {
"end_byte": 40,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck2.ts"
} |
TypeScript/tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck9.ts_0_87 | //@target: ES5
var union: string | string[] | number | symbol;
for (let v of union) { } | {
"end_byte": 87,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck9.ts"
} |
TypeScript/tests/cases/conformance/statements/for-ofStatements/ES5For-of12.ts_0_24 | for ([""] of [[""]]) { } | {
"end_byte": 24,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-ofStatements/ES5For-of12.ts"
} |
TypeScript/tests/cases/conformance/statements/for-ofStatements/ES5For-of26.ts_0_71 | //@sourcemap: true
for (var [a = 0, b = 1] of [2, 3]) {
a;
b;
} | {
"end_byte": 71,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-ofStatements/ES5For-of26.ts"
} |
TypeScript/tests/cases/conformance/statements/for-ofStatements/ES5For-of5.ts_0_38 | for (var _a of []) {
var x = _a;
} | {
"end_byte": 38,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-ofStatements/ES5For-of5.ts"
} |
TypeScript/tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck2.ts_0_40 | //@target: ES5
for (var v of [true]) { } | {
"end_byte": 40,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck2.ts"
} |
TypeScript/tests/cases/conformance/statements/for-ofStatements/ES5For-of19.ts_0_111 | for (let v of []) {
v;
function foo() {
for (const v of []) {
v;
}
}
}
| {
"end_byte": 111,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-ofStatements/ES5For-of19.ts"
} |
TypeScript/tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck6.ts_0_71 | //@target: ES5
var union: string[] | number[];
for (var v of union) { } | {
"end_byte": 71,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck6.ts"
} |
TypeScript/tests/cases/conformance/statements/for-ofStatements/ES5For-of29.ts_0_60 | for (const {x: a = 0, y: b = 1} of [2, 3]) {
a;
b;
} | {
"end_byte": 60,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-ofStatements/ES5For-of29.ts"
} |
TypeScript/tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck7.ts_0_67 | //@target: ES5
var union: string | number;
for (var v of union) { } | {
"end_byte": 67,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck7.ts"
} |
TypeScript/tests/cases/conformance/statements/for-ofStatements/ES5For-of28.ts_0_52 | for (let [a = 0, b = 1] of [2, 3]) {
a;
b;
} | {
"end_byte": 52,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-ofStatements/ES5For-of28.ts"
} |
TypeScript/tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck3.ts_0_78 | //@target: ES5
var tuple: [string, number] = ["", 0];
for (var v of tuple) { } | {
"end_byte": 78,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck3.ts"
} |
TypeScript/tests/cases/conformance/statements/for-ofStatements/ES5For-of18.ts_0_58 | for (let v of []) {
v;
}
for (let v of []) {
v;
}
| {
"end_byte": 58,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-ofStatements/ES5For-of18.ts"
} |
TypeScript/tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck4.ts_0_71 | //@target: ES5
var union: string | string[];
for (const v of union) { } | {
"end_byte": 71,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck4.ts"
} |
TypeScript/tests/cases/conformance/statements/for-ofStatements/ES5For-of8.ts_0_116 | //@sourcemap: true
function foo() {
return { x: 0 };
}
for (foo().x of ['a', 'b', 'c']) {
var p = foo().x;
} | {
"end_byte": 116,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-ofStatements/ES5For-of8.ts"
} |
TypeScript/tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck1.ts_0_36 | //@target: ES5
for (var v of "") { } | {
"end_byte": 36,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck1.ts"
} |
TypeScript/tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck5.ts_0_69 | //@target: ES5
var union: string | number[];
for (var v of union) { } | {
"end_byte": 69,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck5.ts"
} |
TypeScript/tests/cases/conformance/statements/for-ofStatements/ES5For-of9.ts_0_120 | function foo() {
return { x: 0 };
}
for (foo().x of []) {
for (foo().x of []) {
var p = foo().x;
}
} | {
"end_byte": 120,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-ofStatements/ES5For-of9.ts"
} |
TypeScript/tests/cases/conformance/statements/for-ofStatements/ES5For-of31.ts_0_79 | var a: string, b: number;
for ({ a: b = 1, b: a = ""} of []) {
a;
b;
} | {
"end_byte": 79,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-ofStatements/ES5For-of31.ts"
} |
TypeScript/tests/cases/conformance/statements/for-ofStatements/ES5For-of2.ts_0_36 | for (var v of []) {
var x = v;
} | {
"end_byte": 36,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-ofStatements/ES5For-of2.ts"
} |
TypeScript/tests/cases/conformance/statements/for-ofStatements/ES5For-of21.ts_0_48 | for (let v of []) {
for (let _i of []) { }
} | {
"end_byte": 48,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-ofStatements/ES5For-of21.ts"
} |
TypeScript/tests/cases/conformance/statements/for-ofStatements/ES5For-of15.ts_0_79 | for (let v of []) {
v;
for (const v of []) {
var x = v;
}
} | {
"end_byte": 79,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-ofStatements/ES5For-of15.ts"
} |
TypeScript/tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck11.ts_0_80 | //@target: ES5
var union: string | number[];
var v: string;
for (v of union) { } | {
"end_byte": 80,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck11.ts"
} |
TypeScript/tests/cases/conformance/statements/for-ofStatements/ES5For-of35.ts_0_107 | //@sourcemap: true
//@downlevelIteration: true
for (const {x: a = 0, y: b = 1} of [2, 3]) {
a;
b;
} | {
"end_byte": 107,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-ofStatements/ES5For-of35.ts"
} |
TypeScript/tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck1.ts_0_36 | //@target: ES5
for (var v of "") { } | {
"end_byte": 36,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck1.ts"
} |
TypeScript/tests/cases/conformance/statements/for-ofStatements/ES5For-of11.ts_0_24 | var v;
for (v of []) { } | {
"end_byte": 24,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-ofStatements/ES5For-of11.ts"
} |
TypeScript/tests/cases/conformance/statements/for-ofStatements/ES5For-of6.ts_0_75 | for (var w of []) {
for (var v of []) {
var x = [w, v];
}
} | {
"end_byte": 75,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-ofStatements/ES5For-of6.ts"
} |
TypeScript/tests/cases/conformance/statements/for-ofStatements/ES5For-of25.ts_0_72 | //@sourcemap: true
var a = [1, 2, 3];
for (var v of a) {
v;
a;
} | {
"end_byte": 72,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-ofStatements/ES5For-of25.ts"
} |
TypeScript/tests/cases/conformance/statements/for-ofStatements/ES5For-of34.ts_0_144 | //@sourcemap: true
//@downlevelIteration: true
function foo() {
return { x: 0 };
}
for (foo().x of ['a', 'b', 'c']) {
var p = foo().x;
} | {
"end_byte": 144,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-ofStatements/ES5For-of34.ts"
} |
TypeScript/tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts_0_290 | //@target: ES5
// In ES3/5, you cannot for...of over an arbitrary iterable.
class MyStringIterator {
next() {
return {
done: true,
value: ""
};
}
[Symbol.iterator]() {
return this;
}
}
for (var v of new MyStringIterator) { } | {
"end_byte": 290,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts"
} |
TypeScript/tests/cases/conformance/statements/for-ofStatements/ES5For-of10.ts_0_112 | function foo() {
return { x: 0 };
}
for (foo().x of []) {
for (foo().x of [])
var p = foo().x;
} | {
"end_byte": 112,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-ofStatements/ES5For-of10.ts"
} |
TypeScript/tests/cases/conformance/statements/for-ofStatements/ES5For-of7.ts_0_79 | for (var w of []) {
var x = w;
}
for (var v of []) {
var x = [w, v];
} | {
"end_byte": 79,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-ofStatements/ES5For-of7.ts"
} |
TypeScript/tests/cases/conformance/statements/for-ofStatements/ES5For-of24.ts_0_54 | var a = [1, 2, 3];
for (var v of a) {
let a = 0;
} | {
"end_byte": 54,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-ofStatements/ES5For-of24.ts"
} |
TypeScript/tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck14.ts_0_85 | //@target: ES5
//@lib: ES6
var union: string | Set<number>
for (const e of union) { } | {
"end_byte": 85,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck14.ts"
} |
TypeScript/tests/cases/conformance/statements/for-ofStatements/ES5For-of30.ts_0_114 | var a: string, b: number;
var tuple: [number, string] = [2, "3"];
for ([a = 1, b = ""] of tuple) {
a;
b;
} | {
"end_byte": 114,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-ofStatements/ES5For-of30.ts"
} |
TypeScript/tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck4.ts_0_71 | //@target: ES5
var union: string | string[];
for (const v of union) { } | {
"end_byte": 71,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck4.ts"
} |
TypeScript/tests/cases/conformance/statements/for-ofStatements/ES5For-of3.ts_0_64 | //@sourcemap: true
for (var v of ['a', 'b', 'c'])
var x = v; | {
"end_byte": 64,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-ofStatements/ES5For-of3.ts"
} |
TypeScript/tests/cases/conformance/statements/for-ofStatements/ES5For-of20.ts_0_80 | for (let v of []) {
let v;
for (let v of [v]) {
const v;
}
} | {
"end_byte": 80,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-ofStatements/ES5For-of20.ts"
} |
TypeScript/tests/cases/conformance/statements/for-ofStatements/ES5For-of14.ts_0_38 | for (const v of []) {
var x = v;
} | {
"end_byte": 38,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-ofStatements/ES5For-of14.ts"
} |
TypeScript/tests/cases/conformance/statements/for-inStatements/for-inStatementsDestructuring4.ts_0_32 | var a, b;
for ({a, b} in []) { } | {
"end_byte": 32,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-inStatements/for-inStatementsDestructuring4.ts"
} |
TypeScript/tests/cases/conformance/statements/for-inStatements/for-inStatementsDestructuring.ts_0_25 | for (var [a, b] in []) {} | {
"end_byte": 25,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-inStatements/for-inStatementsDestructuring.ts"
} |
TypeScript/tests/cases/conformance/statements/for-inStatements/for-inStatementsArrayErrors.ts_0_238 | // @noImplicitAny: true
let a: Date[];
for (let x in a) {
let a1 = a[x + 1];
let a2 = a[x - 1];
if (x === 1) {
}
let a3 = x.unknownProperty;
}
var i: number;
for (var i in a ) {
}
var j: any;
for (var j in a ) {
}
| {
"end_byte": 238,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-inStatements/for-inStatementsArrayErrors.ts"
} |
TypeScript/tests/cases/conformance/statements/for-inStatements/for-inStatementsAsyncIdentifier.ts_0_64 | // @target: esnext
var async;
for (async in { a: 1, b: 2 }) {}
| {
"end_byte": 64,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-inStatements/for-inStatementsAsyncIdentifier.ts"
} |
TypeScript/tests/cases/conformance/statements/for-inStatements/for-inStatements.ts_0_1421 | var aString: string;
for (aString in {}) { }
var anAny: any;
for (anAny in {}) { }
for (var x in {}) { }
for (var x in []) { }
for (var x in [1, 2, 3, 4, 5]) { }
function fn(): any { }
for (var x in fn()) { }
for (var x in /[a-z]/) { }
for (var x in new Date()) { }
var c: any, d: any, e: any;
for (var x in c || d... | {
"end_byte": 1421,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-inStatements/for-inStatements.ts"
} |
TypeScript/tests/cases/conformance/statements/for-inStatements/for-inStatementsArray.ts_0_555 | let a: Date[];
let b: boolean[];
for (let x in a) {
let a1 = a[x];
let a2 = a[(x)];
let a3 = a[+x];
let b1 = b[x];
let b2 = b[(x)];
let b3 = b[+x];
}
for (let x in a) {
for (let y in a) {
for (let z in a) {
let a1 = a[x];
let a2 = a[y];
let a3 = ... | {
"end_byte": 555,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-inStatements/for-inStatementsArray.ts"
} |
TypeScript/tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts_0_1206 | var aNumber: number;
for (aNumber in {}) { }
var aBoolean: boolean;
for (aBoolean in {}) { }
var aRegExp: RegExp;
for (aRegExp in {}) { }
for (var idx : number in {}) { }
function fn(): void { }
for (var x in fn()) { }
var c : string, d:string, e;
for (var x in c || d) { }
for (var x in e ? c : d) { }
for (var x ... | {
"end_byte": 1206,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts"
} |
TypeScript/tests/cases/conformance/statements/for-inStatements/for-inStatementsDestructuring3.ts_0_32 | var a, b;
for ([a, b] in []) { } | {
"end_byte": 32,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-inStatements/for-inStatementsDestructuring3.ts"
} |
TypeScript/tests/cases/conformance/statements/for-inStatements/for-inStatementsDestructuring2.ts_0_25 | for (var {a, b} in []) {} | {
"end_byte": 25,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/for-inStatements/for-inStatementsDestructuring2.ts"
} |
TypeScript/tests/cases/conformance/statements/continueStatements/invalidWhileContinueStatements.ts_0_529 | // @allowUnusedLabels: true
// @allowUnreachableCode: true
// All errors
// naked continue not allowed
continue;
// non-existent label
ONE:
while (true) continue TWO;
// continue from inside function
TWO:
while (true){
var x = () => {
continue TWO;
}
}
THREE:
while (true) {
var fn = function ()... | {
"end_byte": 529,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/continueStatements/invalidWhileContinueStatements.ts"
} |
TypeScript/tests/cases/conformance/statements/continueStatements/forContinueStatements.ts_0_398 | // @allowUnreachableCode: true
for (; ;) {
continue;
}
ONE:
for (; ;) {
continue ONE;
}
TWO:
THREE:
for (; ;) {
continue THREE;
}
FOUR:
for (; ;) {
FIVE:
for (; ;) {
continue FOUR;
}
}
for (; ;) {
SIX:
for (; ;) continue SIX;
}
SEVEN:
for (; ;) for (; ;) for (; ;) continue ... | {
"end_byte": 398,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/continueStatements/forContinueStatements.ts"
} |
TypeScript/tests/cases/conformance/statements/continueStatements/doWhileContinueStatements.ts_0_456 | // @allowUnreachableCode: true
do {
continue;
} while(true)
ONE:
do {
continue ONE;
}
while (true)
TWO:
THREE:
do {
continue THREE;
}while (true)
FOUR:
do {
FIVE:
do {
continue FOUR;
}while (true)
}while (true)
do {
SIX:
do continue SIX; while(true)
}while (true)
SEVEN:
do ... | {
"end_byte": 456,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/continueStatements/doWhileContinueStatements.ts"
} |
TypeScript/tests/cases/conformance/statements/continueStatements/invalidForInContinueStatements.ts_0_561 | // @allowUnusedLabels: true
// @allowUnreachableCode: true
// All errors
// naked continue not allowed
continue;
// non-existent label
ONE:
for (var x in {}) continue TWO;
// continue from inside function
TWO:
for (var x in {}) {
var fn = () => {
continue TWO;
}
}
THREE:
for (var x in {}) {
var... | {
"end_byte": 561,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/continueStatements/invalidForInContinueStatements.ts"
} |
TypeScript/tests/cases/conformance/statements/continueStatements/invalidDoWhileContinueStatements.ts_0_544 | // @allowUnusedLabels: true
// @allowUnreachableCode: true
// All errors
// naked continue not allowed
continue;
// non-existent label
ONE:
do continue TWO; while (true)
// continue from inside function
TWO:
do {
var x = () => {
continue TWO;
}
}while (true)
THREE:
do {
var fn = function () {
... | {
"end_byte": 544,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/continueStatements/invalidDoWhileContinueStatements.ts"
} |
TypeScript/tests/cases/conformance/statements/continueStatements/invalidForContinueStatements.ts_0_501 | // @allowUnusedLabels: true
// @allowUnreachableCode: true
// All errors
// naked continue not allowed
continue;
// non-existent label
ONE:
for(;;) continue TWO;
// continue from inside function
TWO:
for(;;) {
var x = () => {
continue TWO;
}
}
THREE:
for(;;) {
var fn = function () {
con... | {
"end_byte": 501,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/continueStatements/invalidForContinueStatements.ts"
} |
TypeScript/tests/cases/conformance/statements/continueStatements/forInContinueStatements.ts_0_475 | // @allowUnusedLabels: true
for(var x in {}) {
continue;
}
ONE:
for(var x in {}) {
continue ONE;
}
TWO:
THREE:
for(var x in {}) {
continue THREE;
}
FOUR:
for(var x in {}) {
FIVE:
for(var x in {}) {
continue FOUR;
}
}
for(var x in {}) {
SIX:
for(var x in {}) continue SIX;
}
... | {
"end_byte": 475,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/continueStatements/forInContinueStatements.ts"
} |
TypeScript/tests/cases/conformance/statements/continueStatements/invalidSwitchContinueStatement.ts_0_96 | // continue is not allowed in a switch statement
switch (12) {
case 5:
continue;
}
| {
"end_byte": 96,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/continueStatements/invalidSwitchContinueStatement.ts"
} |
TypeScript/tests/cases/conformance/statements/continueStatements/whileContinueStatements.ts_0_547 | while(true) {
continue;
}
while (true) {
if (true) {
continue;
}
}
ONE:
while (true) {
continue ONE;
}
TWO:
THREE:
while (true) {
continue THREE;
}
FOUR:
while (true) {
FIVE:
while (true) {
continue FOUR;
}
}
while (true) {
SIX:
while (true)
continu... | {
"end_byte": 547,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/continueStatements/whileContinueStatements.ts"
} |
TypeScript/tests/cases/conformance/pedantic/noUncheckedIndexedAccess.ts_0_3592 | // @strict: true
// @noUncheckedIndexedAccess: true
type CheckBooleanOnly<T extends boolean> = any;
// Validate CheckBooleanOnly works - should error
type T_ERR1 = CheckBooleanOnly<boolean | undefined>;
enum NumericEnum1 { A, B, C }
enum NumericEnum2 { A = 0, B = 1 , C = 2 }
enum StringEnum1 { A = "Alpha", B = "Beta"... | {
"end_byte": 3592,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/pedantic/noUncheckedIndexedAccess.ts"
} |
TypeScript/tests/cases/conformance/pedantic/noUncheckedIndexedAccessDestructuring.ts_0_1901 | // @strict: true
// @noUncheckedIndexedAccess: true
declare const strArray: string[];
declare const strStrTuple: [string, string];
// Declaration forms for array destructuring
// Destructuring from a simple array -> include undefined
const [s1] = strArray;
s1.toString(); // Should error, s1 possibly undefined
// De... | {
"end_byte": 1901,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/pedantic/noUncheckedIndexedAccessDestructuring.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck24.ts_0_233 | //@target: ES6
class Foo { x: number }
class Bar extends Foo { y: string }
class Baz { z: number }
function* g3() {
yield;
yield * [new Foo];
yield new Bar;
yield new Baz;
yield *[new Bar];
yield *[new Baz];
} | {
"end_byte": 233,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck24.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck41.ts_0_73 | //@target: ES6
function* g() {
let x = {
[yield 0]: 0
}
} | {
"end_byte": 73,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck41.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck10.ts_0_67 | //@target: ES6
function* g(): IterableIterator<any> {
return;
} | {
"end_byte": 67,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck10.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/YieldExpression17_es6.ts_0_52 | // @target: es6
var v = { get foo() { yield foo; } } | {
"end_byte": 52,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/YieldExpression17_es6.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck51.ts_0_99 | //@target: ES6
//@noImplicitAny: true
function* g() {
function* h() {
yield 0;
}
} | {
"end_byte": 99,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck51.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck34.ts_0_91 | //@target: ES6
function* g() {
yield 0;
function* g2() {
return "";
}
} | {
"end_byte": 91,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck34.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck14.ts_0_60 | //@target: ES6
function* g() {
yield 0;
return "";
} | {
"end_byte": 60,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck14.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck45.ts_0_200 | //@target: ES6
declare function foo<T, U>(x: T, fun: () => Iterator<(x: T) => U>, fun2: (y: U) => T): T;
foo("", function* () { yield x => x.length }, p => undefined); // T is fixed, should be string | {
"end_byte": 200,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck45.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck20.ts_0_137 | //@target: ES6
class Foo { x: number }
class Baz { z: number }
function* g(): IterableIterator<Foo> {
yield;
yield * [new Baz];
} | {
"end_byte": 137,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck20.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck8.ts_0_117 | //@target: ES6
interface BadGenerator extends Iterator<number>, Iterable<string> { }
function* g3(): BadGenerator { } | {
"end_byte": 117,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck8.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck30.ts_0_139 | //@target: ES6
function* g2(): Iterator<Iterable<(x: string) => number>> {
yield function* () {
yield x => x.length;
} ()
} | {
"end_byte": 139,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck30.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck61.ts_0_98 | // @target: ES6
// @experimentalDecorators: true
function * g() {
@(yield 0)
class C {};
} | {
"end_byte": 98,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck61.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorOverloads4.ts_0_126 | //@target: ES6
class C {
f(s: string): Iterable<any>;
f(s: number): Iterable<any>;
*f(s: any): Iterable<any> { }
} | {
"end_byte": 126,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorOverloads4.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck55.ts_0_72 | //@target: ES6
function* g() {
var x = class C extends (yield) {};
} | {
"end_byte": 72,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck55.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck15.ts_0_47 | //@target: ES6
function* g() {
return "";
} | {
"end_byte": 47,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck15.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck44.ts_0_110 | //@target: ES6
function* g() {
let x = {
get [yield 0]() {
return 0;
}
}
} | {
"end_byte": 110,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck44.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck21.ts_0_147 | //@target: ES6
class Foo { x: number }
class Bar extends Foo { y: string }
function* g(): IterableIterator<Foo> {
yield;
yield * new Bar;
} | {
"end_byte": 147,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck21.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck9.ts_0_39 | //@target: ES6
function* g3(): void { } | {
"end_byte": 39,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck9.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck31.ts_0_145 | //@target: ES6
function* g2(): Iterator<() => Iterable<(x: string) => number>> {
yield function* () {
yield x => x.length;
} ()
} | {
"end_byte": 145,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck31.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck60.ts_0_64 | //@target: ES6
function* g() {
class C extends (yield) {};
} | {
"end_byte": 64,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck60.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorOverloads5.ts_0_154 | //@target: ES6
module M {
function f(s: string): Iterable<any>;
function f(s: number): Iterable<any>;
function* f(s: any): Iterable<any> { }
} | {
"end_byte": 154,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorOverloads5.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck54.ts_0_124 | //@target: ES6
class Foo { x: number }
class Baz { z: number }
function* g() {
yield* [new Foo];
yield* [new Baz];
} | {
"end_byte": 124,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck54.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck25.ts_0_238 | //@target: ES6
class Foo { x: number }
class Bar extends Foo { y: string }
class Baz { z: number }
var g3: () => Iterable<Foo> = function* () {
yield;
yield new Bar;
yield new Baz;
yield *[new Bar];
yield *[new Baz];
} | {
"end_byte": 238,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck25.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/YieldExpression2_es6.ts_0_26 | // @target: es6
yield foo; | {
"end_byte": 26,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/YieldExpression2_es6.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck40.ts_0_66 | //@target: ES6
function* g() {
class C extends (yield 0) { }
} | {
"end_byte": 66,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck40.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck11.ts_0_80 | //@target: ES6
function* g(): IterableIterator<number, number> {
return 0;
} | {
"end_byte": 80,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck11.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/yieldExpressionInControlFlow.ts_0_326 | // @noEmit: true
// @allowJs: true
// @checkJs: true
// @noImplicitAny: true
// @lib: esnext
// @Filename: bug25149.js
function* f() {
var o
while (true) {
o = yield o
}
}
// @Filename: alsoFails.ts
// fails in Typescript too
function* g() {
var o = []
while (true) {
o = yield* o
... | {
"end_byte": 326,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/yieldExpressionInControlFlow.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/YieldExpression19_es6.ts_0_104 | // @target: es6
function*foo() {
function bar() {
function* quux() {
yield(foo);
}
}
} | {
"end_byte": 104,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/YieldExpression19_es6.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/YieldExpression15_es6.ts_0_50 | // @target: es6
var v = () => {
yield foo
} | {
"end_byte": 50,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/YieldExpression15_es6.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck50.ts_0_73 | //@target: ES6
//@noImplicitAny: true
function* g() {
yield yield;
} | {
"end_byte": 73,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck50.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/YieldStarExpression4_es6.ts_0_49 | // @target: es6
function *g() {
yield * [];
} | {
"end_byte": 49,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/YieldStarExpression4_es6.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck35.ts_0_90 | //@target: ES6
function* g() {
yield 0;
function g2() {
return "";
}
} | {
"end_byte": 90,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck35.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorOverloads1.ts_0_156 | //@target: ES6
module M {
function* f(s: string): Iterable<any>;
function* f(s: number): Iterable<any>;
function* f(s: any): Iterable<any> { }
} | {
"end_byte": 156,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorOverloads1.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck6.ts_0_41 | //@target: ES6
function* g1(): number { } | {
"end_byte": 41,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck6.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/YieldExpression11_es6.ts_0_58 | // @target: es6
class C {
*foo() {
yield(foo);
}
} | {
"end_byte": 58,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/YieldExpression11_es6.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck2.ts_0_51 | //@target: ES6
function* g1(): Iterable<string> { } | {
"end_byte": 51,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck2.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/YieldExpression6_es6.ts_0_47 | // @target: es6
function* foo() {
yield*foo
} | {
"end_byte": 47,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/YieldExpression6_es6.ts"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.