_id stringlengths 21 254 | text stringlengths 1 93.7k | metadata dict |
|---|---|---|
TypeScript/tests/cases/conformance/es6/templates/templateStringInModulo.ts_3_30 | r x = 1 % `abc${ 1 }def`; | {
"end_byte": 30,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringInModulo.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/taggedTemplateUntypedTagCall01.ts_0_38 | var tag: Function;
tag `Hello world!`; | {
"end_byte": 38,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/taggedTemplateUntypedTagCall01.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeywordES6.ts_3_136 | @target: ES6
function* gen() {
// Once this is supported, yield *must* be parenthesized.
var x = `abc${ yield 10 }def`;
}
| {
"end_byte": 136,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeywordES6.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringUnterminated1_ES6.ts_3_20 | @target: ES6
` | {
"end_byte": 20,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringUnterminated1_ES6.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringControlCharacterEscapes04.ts_5_29 | r x = `\x20\u0020 20`; | {
"end_byte": 29,
"start_byte": 5,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringControlCharacterEscapes04.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringWithEmbeddedTypeOfOperatorES6.ts_3_52 | @target: ES6
var x = `abc${ typeof "hi" }def`; | {
"end_byte": 52,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringWithEmbeddedTypeOfOperatorES6.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/taggedTemplateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpressionES6.ts_3_99 | @target: es6
function foo(...rest: any[]) {
}
foo `${function (x: number) { x = "bad"; } }`; | {
"end_byte": 99,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/taggedTemplateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpressionES6.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringPlainCharactersThatArePartsOfEscapes01.ts_4_85 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2028 2029 0085 t v f b r n` | {
"end_byte": 85,
"start_byte": 4,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringPlainCharactersThatArePartsOfEscapes01.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringTermination4_ES6.ts_3_25 | @target: ES6
`\\\\` | {
"end_byte": 25,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringTermination4_ES6.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringWhitespaceEscapes1.ts_5_18 | t\n\v\f\r`; | {
"end_byte": 18,
"start_byte": 5,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringWhitespaceEscapes1.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringWithBackslashEscapes01_ES6.ts_3_117 | @target: es6
var a = `hello\world`;
var b = `hello\\world`;
var c = `hello\\\world`;
var d = `hello\\\\world`; | {
"end_byte": 117,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringWithBackslashEscapes01_ES6.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringWithEmbeddedComments.ts_3_113 | ead${ // single line comment
10
}
middle${
/* Multi-
* line
* comment
*/
20
// closing comment
}
tail`; | {
"end_byte": 113,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringWithEmbeddedComments.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringMultiline3_ES6.ts_3_45 | @target: es6
// newlines are <CR>
`
\
` | {
"end_byte": 45,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringMultiline3_ES6.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringWithEmbeddedNewOperatorES6.ts_3_57 | @target: ES6
var x = `abc${ new String("Hi") }def`; | {
"end_byte": 57,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringWithEmbeddedNewOperatorES6.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpressionES6.ts_3_61 | @target: es6
`${function (x: number) { x = "bad"; } }`; | {
"end_byte": 61,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpressionES6.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution2_ES6.ts_3_452 | @target: es6
function foo1(strs: TemplateStringsArray, x: number): string;
function foo1(strs: string[], x: number): number;
function foo1(...stuff: any[]): any {
return undefined;
}
var a = foo1 `${1}`;
var b = foo1([], 1);
function foo2(strs: string[], x: number): number;
function foo2(strs: TemplateStringsArra... | {
"end_byte": 452,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution2_ES6.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringWithEmptyLiteralPortionsES6.ts_3_323 | @target: ES6
var a = ``;
var b = `${ 0 }`;
var c = `1${ 0 }`;
var d = `${ 0 }2`;
var e = `1${ 0 }2`;
var f = `${ 0 }${ 0 }`;
var g = `1${ 0 }${ 0 }`;
var h = `${ 0 }2${ 0 }`;
var i = `1${ 0 }2${ 0 }`;
var j = `${ 0 }${ 0 }3`;
var k = `1${ 0 }${ 0 }3`;
var l = `${ 0 }2${ 0 }3`;
var m = `1${ 0 }2${ 0 }3`;
| {
"end_byte": 323,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringWithEmptyLiteralPortionsES6.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringInInstanceOf.ts_3_44 | r x = `abc${ 0 }def` instanceof String; | {
"end_byte": 44,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringInInstanceOf.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/taggedTemplateWithConstructableTag01.ts_0_42 | class CtorTag { }
CtorTag `Hello world!`; | {
"end_byte": 42,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/taggedTemplateWithConstructableTag01.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3.ts_4_2754 | Ambiguous call picks the first overload in declaration order
function fn1(strs: TemplateStringsArray, s: string): string;
function fn1(strs: TemplateStringsArray, n: number): number;
function fn1() { return null; }
var s: string = fn1 `${ undefined }`;
// No candidate overloads found
fn1 `${ {} }`; // Error
functio... | {
"end_byte": 2754,
"start_byte": 4,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringWithEmbeddedTemplateStringES6.ts_3_93 | @target: ES6
var x = `123${ `456 ${ " | " } 654` }321 123${ `456 ${ " | " } 654` }321`; | {
"end_byte": 93,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringWithEmbeddedTemplateStringES6.ts"
} |
TypeScript/tests/cases/conformance/es6/moduleExportsSystem/decoratedDefaultExportsGetExportedSystem.ts_0_244 | // @target: ES6
// @experimentalDecorators: true
// @module: system
// @filename: a.ts
var decorator: ClassDecorator;
@decorator
export default class Foo {}
// @filename: b.ts
var decorator: ClassDecorator;
@decorator
export default class {} | {
"end_byte": 244,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/moduleExportsSystem/decoratedDefaultExportsGetExportedSystem.ts"
} |
TypeScript/tests/cases/conformance/es6/moduleExportsSystem/outFilerootDirModuleNamesSystem.ts_0_320 | // @target: ES6
// @module: system
// @rootDir: src
// @outFile: output.js
// @filename: src/a.ts
import foo from "./b";
export default class Foo {}
foo();
// @filename: src/b.ts
import Foo from "./a";
export default function foo() { new Foo(); }
// https://github.com/microsoft/TypeScript/issues/37429
import("./a");
| {
"end_byte": 320,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/moduleExportsSystem/outFilerootDirModuleNamesSystem.ts"
} |
TypeScript/tests/cases/conformance/es6/moduleExportsSystem/topLevelVarHoistingCommonJS.ts_0_708 | // @target: esnext
// @module: commonjs
// @noTypesAndSymbols: true
declare var _: any;
{
var a = _;
}
if (_) {
var b = _;
}
else {
var c = _;
}
switch (_) {
case _:
var d = _;
default:
var e = _;
}
while (_) {
var f = _;
}
do {
var g = _;
}
while (_);
for (var h = _; ... | {
"end_byte": 708,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/moduleExportsSystem/topLevelVarHoistingCommonJS.ts"
} |
TypeScript/tests/cases/conformance/es6/moduleExportsSystem/defaultExportsGetExportedSystem.ts_0_135 | // @target: ES6
// @module: system
// @filename: a.ts
export default class Foo {}
// @filename: b.ts
export default function foo() {}
| {
"end_byte": 135,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/moduleExportsSystem/defaultExportsGetExportedSystem.ts"
} |
TypeScript/tests/cases/conformance/es6/moduleExportsSystem/topLevelVarHoistingSystem.ts_0_148 | // @target: esnext
// @module: system
// @noTypesAndSymbols: true
if (false) {
var y = 1;
}
function f() {
console.log(y);
}
export { y }; | {
"end_byte": 148,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/moduleExportsSystem/topLevelVarHoistingSystem.ts"
} |
TypeScript/tests/cases/conformance/es6/moduleExportsSystem/anonymousDefaultExportsSystem.ts_0_126 | // @target: ES6
// @module: system
// @filename: a.ts
export default class {}
// @filename: b.ts
export default function() {} | {
"end_byte": 126,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/moduleExportsSystem/anonymousDefaultExportsSystem.ts"
} |
TypeScript/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunctionPropertyES6.ts_3_201 | @target:es6
var obj2 = {
func1(y = 10, ...rest) { },
func2(x = "hello") { },
func3(x: string, z: number, y = "hello") { },
func4(x: string, z: number, y = "hello", ...rest) { },
} | {
"end_byte": 201,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunctionPropertyES6.ts"
} |
TypeScript/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunctionES6.ts_3_157 | @target:es6
function foo(x: string, y = 10) { }
function baz(x: string, y = 5, ...rest) { }
function bar(y = 10) { }
function bar1(y = 10, ...rest) { } | {
"end_byte": 157,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunctionES6.ts"
} |
TypeScript/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersMethodES6.ts_3_359 | @target:es6
class C {
constructor(t: boolean, z: string, x: number, y = "hello") { }
public foo(x: string, t = false) { }
public foo1(x: string, t = false, ...rest) { }
public bar(t = false) { }
public boo(t = false, ...rest) { }
}
class D {
constructor(y = "hello") { }
}
class E {
const... | {
"end_byte": 359,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersMethodES6.ts"
} |
TypeScript/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersMethod.ts_3_361 | @target: es5
class C {
constructor(t: boolean, z: string, x: number, y = "hello") { }
public foo(x: string, t = false) { }
public foo1(x: string, t = false, ...rest) { }
public bar(t = false) { }
public boo(t = false, ...rest) { }
}
class D {
constructor(y = "hello") { }
}
class E {
cons... | {
"end_byte": 361,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersMethod.ts"
} |
TypeScript/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunctionExpressionES6.ts_3_365 | @target:es6
var lambda1 = (y = "hello") => { }
var lambda2 = (x: number, y = "hello") => { }
var lambda3 = (x: number, y = "hello", ...rest) => { }
var lambda4 = (y = "hello", ...rest) => { }
var x = function (str = "hello", ...rest) { }
var y = (function (num = 10, boo = false, ...rest) { })()
var z = (function (num... | {
"end_byte": 365,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunctionExpressionES6.ts"
} |
TypeScript/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunctionProperty.ts_3_203 | @target: es5
var obj2 = {
func1(y = 10, ...rest) { },
func2(x = "hello") { },
func3(x: string, z: number, y = "hello") { },
func4(x: string, z: number, y = "hello", ...rest) { },
}
| {
"end_byte": 203,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunctionProperty.ts"
} |
TypeScript/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunction.ts_3_158 | @target: es5
function foo(x: string, y = 10) { }
function baz(x: string, y = 5, ...rest) { }
function bar(y = 10) { }
function bar1(y = 10, ...rest) { } | {
"end_byte": 158,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunction.ts"
} |
TypeScript/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunctionExpression.ts_3_367 | @target: es5
var lambda1 = (y = "hello") => { }
var lambda2 = (x: number, y = "hello") => { }
var lambda3 = (x: number, y = "hello", ...rest) => { }
var lambda4 = (y = "hello", ...rest) => { }
var x = function (str = "hello", ...rest) { }
var y = (function (num = 10, boo = false, ...rest) { })()
var z = (function (nu... | {
"end_byte": 367,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunctionExpression.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of51.ts_3_40 | @target: ES6
for (let let of []) {} | {
"end_byte": 40,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of51.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of34.ts_3_199 | @target: ES6
//@noImplicitAny: true
class MyStringIterator {
next() {
return v;
}
[Symbol.iterator]() {
return this;
}
}
for (var v of new MyStringIterator) { } | {
"end_byte": 199,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of34.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of24.ts_3_51 | @target: ES6
var x: any;
for (var v of x) { }
| {
"end_byte": 51,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of24.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of41.ts_3_106 | @target: ES6
var array = [{x: [0], y: {p: ""}}]
for (var {x: [a], y: {p}} of array) {
a;
p;
} | {
"end_byte": 106,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of41.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of10.ts_3_51 | @target: ES6
var v: string;
for (v of [0]) { } | {
"end_byte": 51,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of10.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of4.ts_3_47 | @target: ES6
for (var v of [0]) {
v;
} | {
"end_byte": 47,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of4.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of30.ts_3_249 | @target: ES6
class MyStringIterator {
next() {
return {
done: false,
value: ""
}
}
return = 0;
[Symbol.iterator]() {
return this;
}
}
for (var v of new MyStringIterator) { } | {
"end_byte": 249,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of30.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of55.ts_3_58 | @target: ES6
let v = [1];
for (let v of v) {
v;
} | {
"end_byte": 58,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of55.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of14.ts_3_186 | @target: ES6
class MyStringIterator {
next() {
return "";
}
}
var v: string;
for (v of new MyStringIterator) { } // Should fail because the iterator is not iterable | {
"end_byte": 186,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of14.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of45.ts_3_128 | @target: ES6
var k: string, v: boolean;
var map = new Map([["", true]]);
for ([k = "", v = false] of map) {
k;
v;
} | {
"end_byte": 128,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of45.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of20.ts_3_248 | @target: ES6
class Foo { }
class FooIterator {
next() {
return {
value: new Foo,
done: false
};
}
[Symbol.iterator]() {
return this;
}
}
for (let v of new FooIterator) {
v;
} | {
"end_byte": 248,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of20.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of5.ts_3_47 | @target: ES6
for (let v of [0]) {
v;
} | {
"end_byte": 47,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of5.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of31.ts_3_239 | @target: ES6
class MyStringIterator {
next() {
return {
// no done property
value: ""
}
}
[Symbol.iterator]() {
return this;
}
}
for (var v of new MyStringIterator) { } | {
"end_byte": 239,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of31.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of54.ts_3_54 | @target: ES6
for (let v of []) {
var v = 0;
} | {
"end_byte": 54,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of54.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of15.ts_3_202 | @target: ES6
class MyStringIterator {
next() {
return "";
}
[Symbol.iterator]() {
return this;
}
}
var v: string;
for (v of new MyStringIterator) { } // Should fail | {
"end_byte": 202,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of15.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of44.ts_3_170 | @target: ES6
var array: [number, string | boolean | symbol][] = [[0, ""], [0, true], [1, Symbol()]]
for (var [num, strBoolSym] of array) {
num;
strBoolSym;
} | {
"end_byte": 170,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of44.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of21.ts_3_250 | @target: ES6
class Foo { }
class FooIterator {
next() {
return {
value: new Foo,
done: false
};
}
[Symbol.iterator]() {
return this;
}
}
for (const v of new FooIterator) {
v;
} | {
"end_byte": 250,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of21.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of1.ts_3_42 | @target: ES6
var v;
for (v of []) { } | {
"end_byte": 42,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of1.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of50.ts_3_94 | @target: ES6
var map = new Map([["", true]]);
for (const [k, v] of map) {
k;
v;
} | {
"end_byte": 94,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of50.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of35.ts_3_253 | @target: ES6
//@noImplicitAny: true
class MyStringIterator {
next() {
return {
done: true,
value: v
}
}
[Symbol.iterator]() {
return this;
}
}
for (var v of new MyStringIterator) { } | {
"end_byte": 253,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of35.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of25.ts_3_147 | @target: ES6
class MyStringIterator {
[Symbol.iterator]() {
return x;
}
}
var x: any;
for (var v of new MyStringIterator) { } | {
"end_byte": 147,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of25.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of40.ts_3_105 | @target: ES6
var map = new Map([["", true]]);
for (var [k = "", v = false] of map) {
k;
v;
} | {
"end_byte": 105,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of40.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of11.ts_3_55 | @target: ES6
var v: string;
for (v of [0, ""]) { } | {
"end_byte": 55,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of11.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of38.ts_3_92 | @target: ES6
var map = new Map([["", true]]);
for (var [k, v] of map) {
k;
v;
} | {
"end_byte": 92,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of38.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of28.ts_3_153 | @target: ES6
class MyStringIterator {
next: any;
[Symbol.iterator]() {
return this;
}
}
for (var v of new MyStringIterator) { } | {
"end_byte": 153,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of28.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of8.ts_3_43 | @target: ES6
v;
for (var v of [0]) { } | {
"end_byte": 43,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of8.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of18.ts_3_261 | @target: ES6
class MyStringIterator {
next() {
return {
value: "",
done: false
};
}
[Symbol.iterator]() {
return this;
}
}
var v: string;
for (v of new MyStringIterator) { } // Should succeed | {
"end_byte": 261,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of18.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of49.ts_3_120 | @target: ES6
var k: string, v: boolean;
var map = new Map([["", true]]);
for ([k, ...[v]] of map) {
k;
v;
} | {
"end_byte": 120,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of49.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of58.ts_0_142 | // @target: es6
type X = { x: 'x' };
type Y = { y: 'y' };
declare const arr: X[] & Y[];
for (const item of arr) {
item.x;
item.y;
}
| {
"end_byte": 142,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of58.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of9.ts_3_80 | @target: ES6
var v: string;
for (v of ["hello"]) { }
for (v of "hello") { } | {
"end_byte": 80,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of9.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of19.ts_3_248 | @target: ES6
class Foo { }
class FooIterator {
next() {
return {
value: new Foo,
done: false
};
}
[Symbol.iterator]() {
return this;
}
}
for (var v of new FooIterator) {
v;
} | {
"end_byte": 248,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of19.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of48.ts_3_135 | @target: ES6
var x: string, y: number;
var array = [{ x: "", y: true }]
enum E { x }
for ({x, y = E.x} of array) {
x;
y;
} | {
"end_byte": 135,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of48.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of39.ts_3_118 | @lib: es2015
// @target: ES6
var map = new Map([["", true], ["", 0]]);
for (var [k, v] of map) {
k;
v;
} | {
"end_byte": 118,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of39.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of29.ts_3_149 | @target: ES6
var iterableWithOptionalIterator: {
[Symbol.iterator]?(): Iterator<string>
};
for (var v of iterableWithOptionalIterator) { }
| {
"end_byte": 149,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of29.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of6.ts_3_47 | @target: ES6
for (v of [0]) {
let v;
} | {
"end_byte": 47,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of6.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of32.ts_3_61 | @target: ES6
//@noImplicitAny: true
for (var v of v) { } | {
"end_byte": 61,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of32.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of57.ts_0_68 | //@target: ES6
var iter: Iterable<number>;
for (let num of iter) { } | {
"end_byte": 68,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of57.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of47.ts_3_138 | @target: ES6
var x: string, y: number;
var array = [{ x: "", y: true }]
enum E { x }
for ({x, y: y = E.x} of array) {
x;
y;
} | {
"end_byte": 138,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of47.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of16.ts_3_289 | @target: ES6
class MyStringIterator {
[Symbol.iterator]() {
return this;
}
}
var v: string;
for (v of new MyStringIterator) { } // Should fail
for (v of new MyStringIterator) { } // Should still fail (related errors should still be shown even though type is cached). | {
"end_byte": 289,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of16.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of22.ts_3_249 | @target: ES6
class Foo { }
class FooIterator {
next() {
return {
value: new Foo,
done: false
};
}
[Symbol.iterator]() {
return this;
}
}
v;
for (var v of new FooIterator) {
} | {
"end_byte": 249,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of22.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of2.ts_3_44 | @target: ES6
const v;
for (v of []) { } | {
"end_byte": 44,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of2.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of53.ts_3_50 | @target: ES6
for (let v of []) {
var v;
} | {
"end_byte": 50,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of53.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of36.ts_3_92 | @target: ES6
var tuple: [string, boolean] = ["", true];
for (var v of tuple) {
v;
} | {
"end_byte": 92,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of36.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of26.ts_3_187 | @target: ES6
class MyStringIterator {
next() {
return x;
}
[Symbol.iterator]() {
return this;
}
}
var x: any;
for (var v of new MyStringIterator) { } | {
"end_byte": 187,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of26.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of12.ts_3_64 | @target: ES6
var v: string;
for (v of [0, ""].values()) { } | {
"end_byte": 64,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of12.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of43.ts_3_109 | @target: ES6
var array = [{ x: "", y: 0 }]
for (var {x: a = "", y: b = true} of array) {
a;
b;
} | {
"end_byte": 109,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of43.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of3.ts_3_49 | @target: ES6
var v: any;
for (v++ of []) { } | {
"end_byte": 49,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of3.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of-excess-declarations.ts_0_55 | // @target: esnext
for (const a, { [b]: c} of [1]) {
} | {
"end_byte": 55,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of-excess-declarations.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of52.ts_3_45 | @target: ES6
for (let [v, v] of [[]]) {} | {
"end_byte": 45,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of52.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of37.ts_3_80 | @target: ES6
var map = new Map([["", true]]);
for (var v of map) {
v;
} | {
"end_byte": 80,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of37.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of27.ts_3_113 | @target: ES6
class MyStringIterator {
[Symbol.iterator]: any;
}
for (var v of new MyStringIterator) { } | {
"end_byte": 113,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of27.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of13.ts_3_61 | @target: ES6
var v: string;
for (v of [""].values()) { } | {
"end_byte": 61,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of13.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of42.ts_3_97 | @target: ES6
var array = [{ x: "", y: 0 }]
for (var {x: a, y: b} of array) {
a;
b;
} | {
"end_byte": 97,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of42.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of7.ts_3_43 | @target: ES6
v;
for (let v of [0]) { } | {
"end_byte": 43,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of7.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of33.ts_3_158 | @target: ES6
//@noImplicitAny: true
class MyStringIterator {
[Symbol.iterator]() {
return v;
}
}
for (var v of new MyStringIterator) { } | {
"end_byte": 158,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of33.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of56.ts_3_40 | @target: ES6
for (var let of []) {} | {
"end_byte": 40,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of56.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of46.ts_3_128 | @target: ES6
var k: string, v: boolean;
var map = new Map([["", true]]);
for ([k = false, v = ""] of map) {
k;
v;
} | {
"end_byte": 128,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of46.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of17.ts_3_256 | @target: ES6
class NumberIterator {
next() {
return {
value: 0,
done: false
};
}
[Symbol.iterator]() {
return this;
}
}
var v: string;
for (v of new NumberIterator) { } // Should succeed | {
"end_byte": 256,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of17.ts"
} |
TypeScript/tests/cases/conformance/es6/for-ofStatements/for-of23.ts_3_273 | @target: ES6
class Foo { }
class FooIterator {
next() {
return {
value: new Foo,
done: false
};
}
[Symbol.iterator]() {
return this;
}
}
for (const v of new FooIterator) {
const v = 0; // new scope
} | {
"end_byte": 273,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/for-ofStatements/for-of23.ts"
} |
TypeScript/tests/cases/conformance/es6/moduleExportsUmd/anonymousDefaultExportsUmd.ts_0_123 | // @target: ES6
// @module: umd
// @filename: a.ts
export default class {}
// @filename: b.ts
export default function() {} | {
"end_byte": 123,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/moduleExportsUmd/anonymousDefaultExportsUmd.ts"
} |
TypeScript/tests/cases/conformance/es6/moduleExportsUmd/defaultExportsGetExportedUmd.ts_0_132 | // @target: ES6
// @module: umd
// @filename: a.ts
export default class Foo {}
// @filename: b.ts
export default function foo() {}
| {
"end_byte": 132,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/moduleExportsUmd/defaultExportsGetExportedUmd.ts"
} |
TypeScript/tests/cases/conformance/es6/moduleExportsUmd/decoratedDefaultExportsGetExportedUmd.ts_0_242 | // @target: ES6
// @experimentalDecorators: true
// @module: umd
// @filename: a.ts
var decorator: ClassDecorator;
@decorator
export default class Foo {}
// @filename: b.ts
var decorator: ClassDecorator;
@decorator
export default class {}
| {
"end_byte": 242,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/moduleExportsUmd/decoratedDefaultExportsGetExportedUmd.ts"
} |
TypeScript/tests/cases/conformance/es6/modules/exportsAndImports4-es6.ts_0_658 | // @target: es6
// @module: commonjs
// @filename: t1.ts
export default "hello";
// @filename: t2.ts
import a = require("./t1");
a.default;
import b from "./t1";
b;
import * as c from "./t1";
c.default;
import { default as d } from "./t1";
d;
import e1, * as e2 from "./t1";
e1;
e2.default;
import f1, { default as f2 ... | {
"end_byte": 658,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/modules/exportsAndImports4-es6.ts"
} |
TypeScript/tests/cases/conformance/es6/modules/exportSpellingSuggestion.ts_0_171 | // @filename: a.ts
export function assertNever(x: never, msg: string) {
throw new Error("Unexpected " + msg);
}
// @filename: b.ts
import { assertNevar } from "./a";
| {
"end_byte": 171,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/modules/exportSpellingSuggestion.ts"
} |
TypeScript/tests/cases/conformance/es6/modules/reExportDefaultExport.ts_0_184 | // @module: commonjs
// @target: ES5
// @filename: m1.ts
export default function f() {
}
export {f};
// @filename: m2.ts
import foo from "./m1";
import {f} from "./m1";
f();
foo(); | {
"end_byte": 184,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/modules/reExportDefaultExport.ts"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.