_id stringlengths 21 254 | text stringlengths 1 93.7k | metadata dict |
|---|---|---|
TypeScript/tests/cases/conformance/es6/Symbols/symbolProperty12.ts_0_146 | //@target: ES6
class C {
private [Symbol.iterator]: { x };
}
interface I {
[Symbol.iterator]: { x };
}
var i: I;
i = new C;
var c: C = i; | {
"end_byte": 146,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolProperty12.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolProperty43.ts_0_110 | //@target: ES6
class C {
[Symbol.iterator](x: string): string;
[Symbol.iterator](x: number): number;
} | {
"end_byte": 110,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolProperty43.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolProperty26.ts_0_160 | //@target: ES6
class C1 {
[Symbol.toStringTag]() {
return "";
}
}
class C2 extends C1 {
[Symbol.toStringTag]() {
return "";
}
} | {
"end_byte": 160,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolProperty26.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolType14.ts_0_28 | //@target: ES6
new Symbol(); | {
"end_byte": 28,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolType14.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolType20.ts_3_38 | @target: ES6
interface symbol { } | {
"end_byte": 38,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolType20.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolType6.ts_0_158 | //@target: ES6
var s = Symbol.for("add");
var a: any;
s + s;
s - s;
s + "";
s + a;
s + 0;
"" + s;
a + s;
0 + s;
s - 0;
0 - s;
(s || "") + "";
"" + (s || ""); | {
"end_byte": 158,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolType6.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolProperty36.ts_0_97 | //@target: ES6
var x = {
[Symbol.isConcatSpreadable]: 0,
[Symbol.isConcatSpreadable]: 1
} | {
"end_byte": 97,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolProperty36.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolProperty53.ts_0_67 | //@target: ES6
var obj = {
[Symbol.for]: 0
};
obj[Symbol.for]; | {
"end_byte": 67,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolProperty53.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolDeclarationEmit14.ts_0_139 | //@target: ES6
//@declaration: true
class C {
get [Symbol.toPrimitive]() { return ""; }
get [Symbol.toStringTag]() { return ""; }
} | {
"end_byte": 139,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolDeclarationEmit14.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolProperty21.ts_0_266 | //@target: ES6
interface I<T, U> {
[Symbol.unscopables]: T;
[Symbol.isConcatSpreadable]: U;
}
declare function foo<T, U>(p: I<T, U>): { t: T; u: U };
foo({
[Symbol.isConcatSpreadable]: "",
[Symbol.toPrimitive]: 0,
[Symbol.unscopables]: true
}); | {
"end_byte": 266,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolProperty21.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolProperty4.ts_0_114 | //@target: ES6
var x = {
[Symbol()]: 0,
[Symbol()]() { },
get [Symbol()]() {
return 0;
}
} | {
"end_byte": 114,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolProperty4.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolProperty15.ts_0_238 | //@target: ES6
class C { }
interface I {
[Symbol.iterator]?: { x };
}
declare function foo(i: I): I;
declare function foo(a: any): any;
declare function bar(i: C): C;
declare function bar(a: any): any;
foo(new C);
var i: I;
bar(i); | {
"end_byte": 238,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolProperty15.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolProperty44.ts_0_142 | //@target: ES6
class C {
get [Symbol.hasInstance]() {
return "";
}
get [Symbol.hasInstance]() {
return "";
}
} | {
"end_byte": 142,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolProperty44.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolDeclarationEmit7.ts_0_89 | //@target: ES6
//@declaration: true
var obj: {
[Symbol.isConcatSpreadable]: string;
} | {
"end_byte": 89,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolDeclarationEmit7.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolType13.ts_0_101 | //@target: ES6
var s = Symbol();
var x: any;
for (s in {}) { }
for (x in s) { }
for (var y in s) { } | {
"end_byte": 101,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolType13.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolProperty54.ts_0_55 | //@target: ES6
var obj = {
[Symbol.prototype]: 0
}; | {
"end_byte": 55,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolProperty54.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolDeclarationEmit13.ts_0_129 | //@target: ES6
//@declaration: true
class C {
get [Symbol.toPrimitive]() { return ""; }
set [Symbol.toStringTag](x) { }
} | {
"end_byte": 129,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolDeclarationEmit13.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolProperty31.ts_0_150 | //@target: ES6
class C1 {
[Symbol.toStringTag]() {
return { x: "" };
}
}
class C2 extends C1 {
[s: symbol]: () => { x: string };
} | {
"end_byte": 150,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolProperty31.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolProperty60.ts_0_411 | // @target: es2015
// https://github.com/Microsoft/TypeScript/issues/20146
interface I1 {
[Symbol.toStringTag]: string;
[key: string]: number;
}
interface I2 {
[Symbol.toStringTag]: string;
[key: number]: boolean;
}
declare const mySymbol: unique symbol;
interface I3 {
[mySymbol]: string;
[ke... | {
"end_byte": 411,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolProperty60.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolType1.ts_0_211 | //@target: ES6
Symbol() instanceof Symbol;
Symbol instanceof Symbol();
(Symbol() || {}) instanceof Object; // This one should be okay, it's a valid way of distinguishing types
Symbol instanceof (Symbol() || {}); | {
"end_byte": 211,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolType1.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolProperty40.ts_0_238 | //@target: ES6
class C {
[Symbol.iterator](x: string): string;
[Symbol.iterator](x: number): number;
[Symbol.iterator](x: any) {
return undefined;
}
}
var c = new C;
c[Symbol.iterator]("");
c[Symbol.iterator](0);
| {
"end_byte": 238,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolProperty40.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolProperty11.ts_0_109 | //@target: ES6
class C { }
interface I {
[Symbol.iterator]?: { x };
}
var i: I;
i = new C;
var c: C = i; | {
"end_byte": 109,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolProperty11.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolProperty25.ts_0_151 | //@target: ES6
interface I {
[Symbol.toPrimitive]: () => boolean;
}
class C implements I {
[Symbol.toStringTag]() {
return "";
}
} | {
"end_byte": 151,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolProperty25.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolType17.ts_0_116 | //@target: ES6
interface Foo { prop }
var x: symbol | Foo;
x;
if (typeof x === "symbol") {
x;
}
else {
x;
} | {
"end_byte": 116,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolType17.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolDeclarationEmit3.ts_0_158 | //@target: ES6
//@declaration: true
class C {
[Symbol.toPrimitive](x: number);
[Symbol.toPrimitive](x: string);
[Symbol.toPrimitive](x: any) { }
} | {
"end_byte": 158,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolDeclarationEmit3.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolProperty35.ts_0_165 | //@target: ES6
interface I1 {
[Symbol.toStringTag](): { x: string }
}
interface I2 {
[Symbol.toStringTag](): { x: number }
}
interface I3 extends I1, I2 { } | {
"end_byte": 165,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolProperty35.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolType5.ts_0_82 | //@target: ES6
var s = Symbol.for("multiply");
s * s;
s / s;
s % s;
s * 0;
0 / s; | {
"end_byte": 82,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolType5.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolProperty50.ts_0_105 | //@target: ES6
module M {
interface Symbol { }
class C {
[Symbol.iterator]() { }
}
} | {
"end_byte": 105,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolProperty50.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolProperty41.ts_0_274 | //@target: ES6
class C {
[Symbol.iterator](x: string): { x: string };
[Symbol.iterator](x: "hello"): { x: string; hello: string };
[Symbol.iterator](x: any) {
return undefined;
}
}
var c = new C;
c[Symbol.iterator]("");
c[Symbol.iterator]("hello");
| {
"end_byte": 274,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolProperty41.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolProperty1.ts_0_108 | //@target: ES6
var s: symbol;
var x = {
[s]: 0,
[s]() { },
get [s]() {
return 0;
}
} | {
"end_byte": 108,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolProperty1.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolProperty10.ts_0_142 | //@target: ES6
class C {
[Symbol.iterator]: { x; y };
}
interface I {
[Symbol.iterator]?: { x };
}
var i: I;
i = new C;
var c: C = i; | {
"end_byte": 142,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolProperty10.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolProperty24.ts_0_151 | //@target: ES6
interface I {
[Symbol.toPrimitive]: () => boolean;
}
class C implements I {
[Symbol.toPrimitive]() {
return "";
}
} | {
"end_byte": 151,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolProperty24.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolType16.ts_0_99 | //@target: ES6
interface Symbol {
newSymbolProp: number;
}
var sym: symbol;
sym.newSymbolProp; | {
"end_byte": 99,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolType16.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolDeclarationEmit2.ts_0_78 | //@target: ES6
//@declaration: true
class C {
[Symbol.toPrimitive] = "";
} | {
"end_byte": 78,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolDeclarationEmit2.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolProperty34.ts_0_150 | //@target: ES6
class C1 extends C2 {
[Symbol.toStringTag]() {
return { x: "" };
}
}
class C2 {
[s: symbol]: () => { x: number };
} | {
"end_byte": 150,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolProperty34.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolType4.ts_0_55 | //@target: ES6
var s = Symbol.for("postfix");
s++;
s--; | {
"end_byte": 55,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolType4.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolProperty51.ts_0_102 | //@target: ES6
module M {
module Symbol { }
class C {
[Symbol.iterator]() { }
}
} | {
"end_byte": 102,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolProperty51.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolProperty20.ts_0_210 | //@target: ES6
interface I {
[Symbol.iterator]: (s: string) => string;
[Symbol.toStringTag](s: number): number;
}
var i: I = {
[Symbol.iterator]: s => s,
[Symbol.toStringTag](n) { return n; }
} | {
"end_byte": 210,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolProperty20.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolProperty5.ts_0_141 | //@target: ES6
var x = {
[Symbol.iterator]: 0,
[Symbol.toPrimitive]() { },
get [Symbol.toStringTag]() {
return 0;
}
} | {
"end_byte": 141,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolProperty5.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolProperty14.ts_0_271 | //@target: ES6
class C {
[Symbol.iterator]: { x; y };
}
interface I {
[Symbol.iterator]?: { x };
}
declare function foo(i: I): I;
declare function foo(a: any): any;
declare function bar(i: C): C;
declare function bar(a: any): any;
foo(new C);
var i: I;
bar(i); | {
"end_byte": 271,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolProperty14.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolProperty45.ts_0_142 | //@target: ES6
class C {
get [Symbol.hasInstance]() {
return "";
}
get [Symbol.toPrimitive]() {
return "";
}
} | {
"end_byte": 142,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolProperty45.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolDeclarationEmit6.ts_0_92 | //@target: ES6
//@declaration: true
interface I {
[Symbol.isConcatSpreadable]: string;
} | {
"end_byte": 92,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolDeclarationEmit6.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolType12.ts_0_281 | //@target: ES6
var s = Symbol.for("assign");
var str = "";
s *= s;
s *= 0;
s /= s;
s /= 0;
s %= s;
s %= 0;
s += s;
s += 0;
s += "";
str += s;
s -= s;
s -= 0;
s <<= s;
s <<= 0;
s >>= s;
s >>= 0;
s >>>= s;
s >>>= 0;
s &= s;
s &= 0;
s ^= s;
s ^= 0;
s |= s;
s |= 0;
str += (s || str); | {
"end_byte": 281,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolType12.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolProperty55.ts_0_364 | //@target: ES6
var obj = {
[Symbol.iterator]: 0
};
module M {
var Symbol: SymbolConstructor;
// The following should be of type 'any'. This is because even though obj has a property keyed by Symbol.iterator,
// the key passed in here is the *wrong* Symbol.iterator. It is not the iterator property of th... | {
"end_byte": 364,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolProperty55.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolDeclarationEmit12.ts_0_346 | //@target: ES6
//@declaration: true
module M {
interface I { }
export class C {
[Symbol.iterator]: I;
[Symbol.toPrimitive](x: I) { }
[Symbol.isConcatSpreadable](): I {
return undefined
}
get [Symbol.toPrimitive]() { return undefined; }
set [Symbol.toPr... | {
"end_byte": 346,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolDeclarationEmit12.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolProperty30.ts_0_126 | //@target: ES6
class C1 {
[Symbol.toStringTag]() {
return { x: "" };
}
[s: symbol]: () => { x: number };
} | {
"end_byte": 126,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolProperty30.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolProperty61.ts_0_565 | // @target: ES6
// @declaration: true
declare global {
interface SymbolConstructor {
readonly obs: symbol
}
}
const observable: typeof Symbol.obs = Symbol.obs
export class MyObservable<T> {
constructor(private _val: T) {}
subscribe(next: (val: T) => void) {
next(this._val)
}
[observ... | {
"end_byte": 565,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolProperty61.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolType19.ts_0_102 | //@target: ES6
enum E { }
var x: symbol | E;
x;
if (typeof x === "number") {
x;
}
else {
x;
} | {
"end_byte": 102,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolType19.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolDeclarationEmit9.ts_0_87 | //@target: ES6
//@declaration: true
var obj = {
[Symbol.isConcatSpreadable]() { }
} | {
"end_byte": 87,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolDeclarationEmit9.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolDeclarationEmit8.ts_0_84 | //@target: ES6
//@declaration: true
var obj = {
[Symbol.isConcatSpreadable]: 0
} | {
"end_byte": 84,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolDeclarationEmit8.ts"
} |
TypeScript/tests/cases/conformance/es6/Symbols/symbolType18.ts_0_116 | //@target: ES6
interface Foo { prop }
var x: symbol | Foo;
x;
if (typeof x === "object") {
x;
}
else {
x;
} | {
"end_byte": 116,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/Symbols/symbolType18.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringInNewExpression.ts_3_57 | w `abc${0}abc`(`hello ${0} world`, ` `, `1${2}3`); | {
"end_byte": 57,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringInNewExpression.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/taggedTemplateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpression.ts_5_85 | nction foo(...rest: any[]) {
}
foo `${function (x: number) { x = "bad"; } }`; | {
"end_byte": 85,
"start_byte": 5,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/taggedTemplateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpression.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringTermination1_ES6.ts_3_21 | @target: ES6
`` | {
"end_byte": 21,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringTermination1_ES6.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTagsES6.ts_3_573 | @target: ES6
interface I {
(stringParts: TemplateStringsArray, ...rest: boolean[]): I;
g: I;
h: I;
member: I;
thisIsNotATag(x: string): void
[x: number]: I;
}
var f: I;
f `abc`
f `abc${1}def${2}ghi`;
f `abc`.member
f `abc${1}def${2}ghi`.member;
f `abc`["member"];
f `abc${1}def${2}ghi`["m... | {
"end_byte": 573,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTagsES6.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringWithEmbeddedDivision.ts_3_30 | r x = `abc${ 1 / 1 }def`; | {
"end_byte": 30,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringWithEmbeddedDivision.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringInFunctionParameterTypeES6.ts_3_102 | @target: ES6
function f(`hello`);
function f(x: string);
function f(x: string) {
return x;
} | {
"end_byte": 102,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringInFunctionParameterTypeES6.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringControlCharacterEscapes03_ES6.ts_3_47 | @target: es6
var x = `\x1F\u001f 1F 1f`; | {
"end_byte": 47,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringControlCharacterEscapes03_ES6.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringPlainCharactersThatArePartsOfEscapes02.ts_5_289 | ${ " " }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": 289,
"start_byte": 5,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringPlainCharactersThatArePartsOfEscapes02.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringWhitespaceEscapes2_ES6.ts_3_100 | @target: es6
// <TAB>, <VT>, <FF>, <SP>, <NBSP>, <BOM>
`\u0009\u000B\u000C\u0020\u00A0\uFEFF`; | {
"end_byte": 100,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringWhitespaceEscapes2_ES6.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringWhitespaceEscapes2.ts_5_86 | <TAB>, <VT>, <FF>, <SP>, <NBSP>, <BOM>
`\u0009\u000B\u000C\u0020\u00A0\uFEFF`; | {
"end_byte": 86,
"start_byte": 5,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringWhitespaceEscapes2.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringInDeleteExpression.ts_3_23 | lete `abc${0}abc`; | {
"end_byte": 23,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringInDeleteExpression.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringBinaryOperations.ts_3_1354 | r a = 1 + `${ 3 }`;
var b = 1 + `2${ 3 }`;
var c = 1 + `${ 3 }4`;
var d = 1 + `2${ 3 }4`;
var e = `${ 3 }` + 5;
var f = `2${ 3 }` + 5;
var g = `${ 3 }4` + 5;
var h = `2${ 3 }4` + 5;
var i = 1 + `${ 3 }` + 5;
var j = 1 + `2${ 3 }` + 5;
var k = 1 + `${ 3 }4` + 5;
var l = 1 + `2${ 3 }4` + 5;
var a2 = 1 + `${ 3 - 4 }`;
va... | {
"end_byte": 1354,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringBinaryOperations.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringUnterminated4_ES6.ts_3_24 | @target: ES6
`\\\` | {
"end_byte": 24,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringUnterminated4_ES6.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringInWhile.ts_3_45 | ile (`abc${0}abc`) {
`def${1}def`;
} | {
"end_byte": 45,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringInWhile.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringInWhileES6.ts_3_61 | @target: ES6
while (`abc${0}abc`) {
`def${1}def`;
} | {
"end_byte": 61,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringInWhileES6.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringInCallExpression.ts_3_53 | bc${0}abc`(`hello ${0} world`, ` `, `1${2}3`); | {
"end_byte": 53,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringInCallExpression.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/taggedTemplateWithConstructableTag02.ts_0_101 | interface I {
new (...args: any[]): string;
new (): number;
}
var tag: I;
tag `Hello world!`; | {
"end_byte": 101,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/taggedTemplateWithConstructableTag02.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringControlCharacterEscapes03.ts_5_32 | r x = `\x1F\u001f 1F 1f`; | {
"end_byte": 32,
"start_byte": 5,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringControlCharacterEscapes03.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringWithPropertyAccess.ts_3_31 | bc${0}abc`.indexOf(`abc`); | {
"end_byte": 31,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringWithPropertyAccess.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringInModuloES6.ts_3_46 | @target: ES6
var x = 1 % `abc${ 1 }def`; | {
"end_byte": 46,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringInModuloES6.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringWithEmbeddedInOperatorES6.ts_3_69 | @target: ES6
var x = `abc${ "hi" in { hi: 10, hello: 20} }def`; | {
"end_byte": 69,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringWithEmbeddedInOperatorES6.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringInSwitchAndCase.ts_3_105 | itch (`abc${0}abc`) {
case `abc`:
case `123`:
case `abc${0}abc`:
`def${1}def`;
} | {
"end_byte": 105,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringInSwitchAndCase.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringInNewOperatorES6.ts_3_46 | @target: ES6
var x = new `abc${ 1 }def`; | {
"end_byte": 46,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringInNewOperatorES6.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/taggedTemplateStringsPlainCharactersThatArePartsOfEscapes01_ES6.ts_3_133 | @target: es6
function f(...x: any[]) {
}
f `0 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": 133,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/taggedTemplateStringsPlainCharactersThatArePartsOfEscapes01_ES6.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringControlCharacterEscapes02.ts_5_29 | r x = `\x19\u0019 19`; | {
"end_byte": 29,
"start_byte": 5,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringControlCharacterEscapes02.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringInDeleteExpressionES6.ts_3_39 | @target: ES6
delete `abc${0}abc`; | {
"end_byte": 39,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringInDeleteExpressionES6.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInferenceES6.ts_3_3924 | @target: es6
// Generic tag with one parameter
function noParams<T>(n: T) { }
noParams ``;
// Generic tag with parameter which does not use type parameter
function noGenericParams<T>(n: TemplateStringsArray) { }
noGenericParams ``;
// Generic tag with multiple type parameters and only one used in parameter type anno... | {
"end_byte": 3924,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInferenceES6.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringInNewOperator.ts_3_30 | r x = new `abc${ 1 }def`; | {
"end_byte": 30,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringInNewOperator.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringInEqualityChecks.ts_3_143 | r x = `abc${0}abc` === `abc` ||
`abc` !== `abc${0}abc` &&
`abc${0}abc` == "abc0abc" &&
"abc0abc" !== `abc${0}abc`; | {
"end_byte": 143,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringInEqualityChecks.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/taggedTemplateStringsWithManyCallAndMemberExpressions.ts_3_290 | terface I {
(strs: TemplateStringsArray, ...subs: number[]): I;
member: {
new (s: string): {
new (n: number): {
new (): boolean;
}
}
};
}
var f: I;
var x = new new new f `abc${ 0 }def`.member("hello")(42) === true;
| {
"end_byte": 290,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/taggedTemplateStringsWithManyCallAndMemberExpressions.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts_3_828 | nction foo(strs: TemplateStringsArray): number;
function foo(strs: TemplateStringsArray, x: number): string;
function foo(strs: TemplateStringsArray, x: number, y: number): boolean;
function foo(strs: TemplateStringsArray, x: number, y: string): {};
function foo(...stuff: any[]): any {
return undefined;
}
var a = ... | {
"end_byte": 828,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringInYieldKeyword.ts_3_160 | @target: es6
function* gen() {
// Once this is supported, the inner expression does not need to be parenthesized.
var x = yield `abc${ x }def`;
}
| {
"end_byte": 160,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringInYieldKeyword.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts_3_558 | terface I {
(stringParts: TemplateStringsArray, ...rest: boolean[]): I;
g: I;
h: I;
member: I;
thisIsNotATag(x: string): void
[x: number]: I;
}
var f: I;
f `abc`
f `abc${1}def${2}ghi`;
f `abc`.member
f `abc${1}def${2}ghi`.member;
f `abc`["member"];
f `abc${1}def${2}ghi`["member"];
f `abc... | {
"end_byte": 558,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringTermination3_ES6.ts_3_23 | @target: ES6
`\`` | {
"end_byte": 23,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringTermination3_ES6.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/taggedTemplateStringsWithTypedTagsES6.ts_3_498 | @target: ES6
interface I {
(stringParts: TemplateStringsArray, ...rest: number[]): I;
g: I;
h: I;
member: I;
thisIsNotATag(x: string): void
[x: number]: I;
}
var f: I;
f `abc`
f `abc${1}def${2}ghi`;
f `abc`.member
f `abc${1}def${2}ghi`.member;
f `abc`["member"];
f `abc${1}def${2}ghi`["me... | {
"end_byte": 498,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/taggedTemplateStringsWithTypedTagsES6.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/taggedTemplateStringsWithTagsTypedAsAny.ts_3_373 | r f: any;
f `abc`
f `abc${1}def${2}ghi`;
f.g.h `abc`
f.g.h `abc${1}def${2}ghi`;
f `abc`.member
f `abc${1}def${2}ghi`.member;
f `abc`["member"];
f `abc${1}def${2}ghi`["member"];
f `abc`["member"].someOtherTag `abc${1}def${2}ghi`;
f `abc${1}def${2}ghi`["member"].someOtherTag `abc${1}def${2}ghi`;
f.thisIsNotATa... | {
"end_byte": 373,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/taggedTemplateStringsWithTagsTypedAsAny.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringWithEmbeddedArray.ts_3_32 | r x = `abc${ [1,2,3] }def`; | {
"end_byte": 32,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringWithEmbeddedArray.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/taggedTemplateStringsWithTagsTypedAsAnyES6.ts_3_388 | @target: ES6
var f: any;
f `abc`
f `abc${1}def${2}ghi`;
f.g.h `abc`
f.g.h `abc${1}def${2}ghi`;
f `abc`.member
f `abc${1}def${2}ghi`.member;
f `abc`["member"];
f `abc${1}def${2}ghi`["member"];
f `abc`["member"].someOtherTag `abc${1}def${2}ghi`;
f `abc${1}def${2}ghi`["member"].someOtherTag `abc${1}def${2}ghi`;
... | {
"end_byte": 388,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/taggedTemplateStringsWithTagsTypedAsAnyES6.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringInObjectLiteral.ts_3_52 | r x = {
a: `abc${ 123 }def`,
`b`: 321
} | {
"end_byte": 52,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringInObjectLiteral.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringInInOperator.ts_3_47 | r x = `${ "hi" }` in { hi: 10, hello: 20}; | {
"end_byte": 47,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringInInOperator.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringWithEmbeddedCommentsES6.ts_3_129 | @target: ES6
`head${ // single line comment
10
}
middle${
/* Multi-
* line
* comment
*/
20
// closing comment
}
tail`; | {
"end_byte": 129,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringWithEmbeddedCommentsES6.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringControlCharacterEscapes01_ES6.ts_3_53 | @target: es6
var x = `\0\x00\u0000 0 00 0000`; | {
"end_byte": 53,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringControlCharacterEscapes01_ES6.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringInInstanceOfES6.ts_3_60 | @target: ES6
var x = `abc${ 0 }def` instanceof String; | {
"end_byte": 60,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringInInstanceOfES6.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringTermination2.ts_4_8 | \` | {
"end_byte": 8,
"start_byte": 4,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringTermination2.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringInTypeOfES6.ts_3_51 | @target: ES6
var x = typeof `abc${ 123 }def`; | {
"end_byte": 51,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringInTypeOfES6.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringInFunctionParameterType.ts_3_86 | nction f(`hello`);
function f(x: string);
function f(x: string) {
return x;
} | {
"end_byte": 86,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringInFunctionParameterType.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringWithCommentsInArrowFunction.ts_3_149 | @removeComments: false
const a = 1;
const f1 = () =>
`${
// a
a
}a`;
const f2 = () =>
`${
// a
a
}`;
| {
"end_byte": 149,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringWithCommentsInArrowFunction.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringInSwitchAndCaseES6.ts_3_121 | @target: ES6
switch (`abc${0}abc`) {
case `abc`:
case `123`:
case `abc${0}abc`:
`def${1}def`;
} | {
"end_byte": 121,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringInSwitchAndCaseES6.ts"
} |
TypeScript/tests/cases/conformance/es6/templates/templateStringUnterminated2_ES6.ts_3_22 | @target: ES6
`\` | {
"end_byte": 22,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/templates/templateStringUnterminated2_ES6.ts"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.