_id stringlengths 21 254 | text stringlengths 1 93.7k | metadata dict |
|---|---|---|
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorInAmbientContext1.ts_0_57 | //@target: ES6
declare class C {
*generator(): any;
} | {
"end_byte": 57,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorInAmbientContext1.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/YieldStarExpression2_es6.ts_0_24 | // @target: es6
yield *; | {
"end_byte": 24,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/YieldStarExpression2_es6.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/YieldExpression13_es6.ts_0_41 | // @target: es6
function* foo() { yield } | {
"end_byte": 41,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/YieldExpression13_es6.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/YieldExpression4_es6.ts_0_53 | // @target: es6
function* foo() {
yield;
yield;
} | {
"end_byte": 53,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/YieldExpression4_es6.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck3.ts_0_59 | //@target: ES6
function* g1(): IterableIterator<string> { } | {
"end_byte": 59,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck3.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/YieldExpression8_es6.ts_0_61 | // @target: es6
yield(foo);
function* foo() {
yield(foo);
} | {
"end_byte": 61,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/YieldExpression8_es6.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorInAmbientContext5.ts_0_73 | //@target: ES6
//@declaration: true
class C {
*generator(): any { }
} | {
"end_byte": 73,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorInAmbientContext5.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck7.ts_0_120 | //@target: ES6
interface WeirdIter extends IterableIterator<number> {
hello: string;
}
function* g1(): WeirdIter { } | {
"end_byte": 120,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck7.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorInAmbientContext2.ts_0_67 | //@target: ES6
declare module M {
function *generator(): any;
} | {
"end_byte": 67,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorInAmbientContext2.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck28.ts_0_168 | //@target: ES6
function* g(): IterableIterator<(x: string) => number> {
yield * {
*[Symbol.iterator]() {
yield x => x.length;
}
};
} | {
"end_byte": 168,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck28.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck38.ts_0_81 | //@target: ES6
var yield;
function* g() {
yield 0;
var v: typeof yield;
} | {
"end_byte": 81,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck38.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorInAmbientContext6.ts_0_90 | //@target: ES6
//@declaration: true
module M {
export function *generator(): any { }
} | {
"end_byte": 90,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorInAmbientContext6.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/YieldExpression16_es6.ts_0_73 | // @target: es6
function* foo() {
function bar() {
yield foo;
}
} | {
"end_byte": 73,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/YieldExpression16_es6.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck18.ts_0_133 | //@target: ES6
class Foo { x: number }
class Baz { z: number }
function* g(): IterableIterator<Foo> {
yield;
yield new Baz;
} | {
"end_byte": 133,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck18.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck49.ts_0_69 | //@target: ES6
//@noImplicitAny: true
function* g() {
yield 0;
} | {
"end_byte": 69,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck49.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck59.ts_0_123 | // @target: ES6
// @experimentalDecorators: true
function* g() {
class C {
@(yield "")
m() { }
};
} | {
"end_byte": 123,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck59.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck4.ts_0_37 | //@target: ES6
function* g1(): {} { } | {
"end_byte": 37,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck4.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/YieldExpression1_es6.ts_0_22 | // @target: es6
yield; | {
"end_byte": 22,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/YieldExpression1_es6.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/YieldExpression18_es6.ts_0_41 | // @target: es6
"use strict";
yield(foo); | {
"end_byte": 41,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/YieldExpression18_es6.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck19.ts_0_149 | //@target: ES6
class Foo { x: number }
class Bar extends Foo { y: string }
function* g(): IterableIterator<Foo> {
yield;
yield * [new Bar];
} | {
"end_byte": 149,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck19.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/YieldExpression14_es6.ts_0_56 | // @target: es6
class C {
foo() {
yield foo
}
} | {
"end_byte": 56,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/YieldExpression14_es6.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck48.ts_0_108 | //@target: ES6
//@noImplicitAny: true
function* g() {
yield;
}
function* h() {
yield undefined;
}
| {
"end_byte": 108,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck48.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck58.ts_0_81 | //@target: ES6
function* g() {
class C {
static x = yield 0;
};
} | {
"end_byte": 81,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck58.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/YieldExpression3_es6.ts_0_51 | // @target: es6
function* foo() {
yield
yield
} | {
"end_byte": 51,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/YieldExpression3_es6.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck5.ts_0_38 | //@target: ES6
function* g1(): any { } | {
"end_byte": 38,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck5.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck29.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/generatorTypeCheck29.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck39.ts_0_184 | // @target: ES6
// @experimentalDecorators: true
function decorator(x: any) {
return y => { };
}
function* g() {
@decorator(yield 0)
class C {
x = yield 0;
}
} | {
"end_byte": 184,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck39.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorInAmbientContext4.d.ts_0_67 | //@target: ES6
declare module M {
function *generator(): any;
} | {
"end_byte": 67,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorInAmbientContext4.d.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck1.ts_0_51 | //@target: ES6
function* g1(): Iterator<string> { } | {
"end_byte": 51,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck1.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck47.ts_0_56 | //@target: ES6
//@noImplicitAny: true
function* g() { } | {
"end_byte": 56,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck47.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck16.ts_0_44 | //@target: ES6
function* g() {
return;
} | {
"end_byte": 44,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck16.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck22.ts_0_210 | //@target: ES6
class Foo { x: number }
class Bar extends Foo { y: string }
class Baz { z: number }
function* g3() {
yield;
yield new Bar;
yield new Baz;
yield *[new Bar];
yield *[new Baz];
} | {
"end_byte": 210,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck22.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/YieldExpression7_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/YieldExpression7_es6.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/YieldExpression10_es6.ts_0_58 | // @target: es6
var v = { * foo() {
yield(foo);
}
}
| {
"end_byte": 58,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/YieldExpression10_es6.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/YieldStarExpression1_es6.ts_0_27 | // @target: es6
yield * []; | {
"end_byte": 27,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/YieldStarExpression1_es6.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck63.ts_3_1389 | @module: commonjs
// @target: es6
// @noImplicitAny: true
export interface StrategicState {
lastStrategyApplied?: string;
}
export function strategy<T extends StrategicState>(stratName: string, gen: (a: T) => IterableIterator<T | undefined, void>): (a: T) => IterableIterator<T | undefined, void> {
return fun... | {
"end_byte": 1389,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck63.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck32.ts_0_66 | //@target: ES6
var s: string;
var f: () => number = () => yield s; | {
"end_byte": 66,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck32.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck57.ts_0_74 | //@target: ES6
function* g() {
class C {
x = yield 0;
};
} | {
"end_byte": 74,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck57.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck26.ts_0_175 | //@target: ES6
function* g(): IterableIterator<(x: string) => number, (x: string) => number> {
yield x => x.length;
yield *[x => x.length];
return x => x.length;
} | {
"end_byte": 175,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck26.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorInAmbientContext3.d.ts_0_57 | //@target: ES6
declare class C {
*generator(): any;
} | {
"end_byte": 57,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorInAmbientContext3.d.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck12.ts_0_81 | //@target: ES6
function* g(): IterableIterator<number, string> {
return "";
} | {
"end_byte": 81,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck12.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck43.ts_0_86 | //@target: ES6
function* g() {
let x = {
*[yield 0]() {
}
}
} | {
"end_byte": 86,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck43.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck53.ts_0_121 | //@target: ES6
class Foo { x: number }
class Baz { z: number }
function* g() {
yield new Foo;
yield* [new Baz];
} | {
"end_byte": 121,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck53.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorOverloads2.ts_0_161 | //@target: ES6
declare module M {
function* f(s: string): Iterable<any>;
function* f(s: number): Iterable<any>;
function* f(s: any): Iterable<any>;
} | {
"end_byte": 161,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorOverloads2.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck36.ts_0_51 | //@target: ES6
function* g() {
yield yield 0;
} | {
"end_byte": 51,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck36.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck27.ts_0_139 | //@target: ES6
function* g(): IterableIterator<(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/generatorTypeCheck27.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck13.ts_0_94 | //@target: ES6
function* g(): IterableIterator<number, string> {
yield 0;
return "";
} | {
"end_byte": 94,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck13.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck42.ts_0_85 | //@target: ES6
function* g() {
let x = {
[yield 0]() {
}
}
} | {
"end_byte": 85,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck42.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck52.ts_0_118 | //@target: ES6
class Foo { x: number }
class Baz { z: number }
function* g() {
yield new Foo;
yield new Baz;
} | {
"end_byte": 118,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck52.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorOverloads3.ts_0_128 | //@target: ES6
class C {
*f(s: string): Iterable<any>;
*f(s: number): Iterable<any>;
*f(s: any): Iterable<any> { }
} | {
"end_byte": 128,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorOverloads3.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck37.ts_0_58 | //@target: ES6
function* g() {
return yield yield 0;
} | {
"end_byte": 58,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck37.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorNoImplicitReturns.ts_0_180 | // @target: esnext
// @noImplicitReturns: true
// @strictNullChecks: false
function* testGenerator () {
if (Math.random() > 0.5) {
return;
}
yield 'hello';
}
| {
"end_byte": 180,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorNoImplicitReturns.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck46.ts_0_272 | //@target: ES6
declare function foo<T, U>(x: T, fun: () => Iterable<(x: T) => U>, fun2: (y: U) => T): T;
foo("", function* () {
yield* {
*[Symbol.iterator]() {
yield x => x.length
}
}
}, p => undefined); // T is fixed, should be string | {
"end_byte": 272,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck46.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck17.ts_0_145 | //@target: ES6
class Foo { x: number }
class Bar extends Foo { y: string }
function* g(): IterableIterator<Foo> {
yield;
yield new Bar;
} | {
"end_byte": 145,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck17.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck23.ts_0_229 | //@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": 229,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck23.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/YieldExpression5_es6.ts_0_44 | // @target: es6
function* foo() {
yield*
} | {
"end_byte": 44,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/YieldExpression5_es6.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/YieldExpression9_es6.ts_0_53 | // @target: es6
var v = function*() {
yield(foo);
} | {
"end_byte": 53,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/YieldExpression9_es6.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/YieldExpression12_es6.ts_0_64 | // @target: es6
class C {
constructor() {
yield foo
}
} | {
"end_byte": 64,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/YieldExpression12_es6.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck62.ts_3_1162 | @module: commonjs
// @target: es6
// @noImplicitAny: true
export interface StrategicState {
lastStrategyApplied?: string;
}
export function strategy<T extends StrategicState>(stratName: string, gen: (a: T) => IterableIterator<T | undefined, void>): (a: T) => IterableIterator<T | undefined, void> {
return fun... | {
"end_byte": 1162,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck62.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/YieldStarExpression3_es6.ts_0_46 | // @target: es6
function *g() {
yield *;
} | {
"end_byte": 46,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/YieldStarExpression3_es6.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck33.ts_0_90 | //@target: ES6
function* g() {
yield 0;
function* g2() {
yield "";
}
} | {
"end_byte": 90,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck33.ts"
} |
TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck56.ts_0_115 | //@target: ES6
function* g() {
var x = class C {
*[yield 0]() {
yield 0;
}
};
} | {
"end_byte": 115,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck56.ts"
} |
TypeScript/tests/cases/conformance/es6/moduleExportsCommonjs/anonymousDefaultExportsCommonjs.ts_0_128 | // @target: ES6
// @module: commonjs
// @filename: a.ts
export default class {}
// @filename: b.ts
export default function() {} | {
"end_byte": 128,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/moduleExportsCommonjs/anonymousDefaultExportsCommonjs.ts"
} |
TypeScript/tests/cases/conformance/es6/moduleExportsCommonjs/defaultExportsGetExportedCommonjs.ts_0_137 | // @target: ES6
// @module: commonjs
// @filename: a.ts
export default class Foo {}
// @filename: b.ts
export default function foo() {}
| {
"end_byte": 137,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/moduleExportsCommonjs/defaultExportsGetExportedCommonjs.ts"
} |
TypeScript/tests/cases/conformance/es6/moduleExportsCommonjs/decoratedDefaultExportsGetExportedCommonjs.ts_0_247 | // @target: ES6
// @experimentalDecorators: true
// @module: commonjs
// @filename: a.ts
var decorator: ClassDecorator;
@decorator
export default class Foo {}
// @filename: b.ts
var decorator: ClassDecorator;
@decorator
export default class {}
| {
"end_byte": 247,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/moduleExportsCommonjs/decoratedDefaultExportsGetExportedCommonjs.ts"
} |
TypeScript/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithMethodInES6.ts_3_598 | @target:es6
class D {
_bar: string;
foo() { }
["computedName1"]() { }
["computedName2"](a: string) { }
["computedName3"](a: string): number { return 1; }
bar(): string {
return this._bar;
}
baz(a: any, x: string): string {
return "HELLO";
}
static ["computedname... | {
"end_byte": 598,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithMethodInES6.ts"
} |
TypeScript/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithTypeArgumentInES6.ts_3_230 | @target: es6
class B<T> {
x: T;
B: T;
constructor(a: T) { this.B = a;}
foo(): T {
return this.x;
}
get BB(): T {
return this.B;
}
set BBWith(c: T) {
this.B = c;
}
} | {
"end_byte": 230,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithTypeArgumentInES6.ts"
} |
TypeScript/tests/cases/conformance/es6/classDeclaration/parseClassDeclarationInStrictModeByDefaultInES6.ts_3_176 | @target: es6
class C {
interface = 10;
public implements() { }
public foo(arguments: any) { }
private bar(eval:any) {
arguments = "hello";
}
} | {
"end_byte": 176,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/classDeclaration/parseClassDeclarationInStrictModeByDefaultInES6.ts"
} |
TypeScript/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithExtensionAndTypeArgumentInES6.ts_3_196 | @target: es6
class B<T> {
constructor(a: T) { }
}
class C extends B<string> { }
class D extends B<number> {
constructor(a: any)
constructor(b: number) {
super(b);
}
} | {
"end_byte": 196,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithExtensionAndTypeArgumentInES6.ts"
} |
TypeScript/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing8.ts_3_207 | ass Base {
constructor(c) { }
}
class D extends Base {
private _t;
constructor() {
let x = {
k: super(undefined),
j: this._t, // no error
}
}
}
| {
"end_byte": 207,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing8.ts"
} |
TypeScript/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithGetterSetterInES6.ts_3_535 | @target:es6
class C {
_name: string;
get name(): string {
return this._name;
}
static get name2(): string {
return "BYE";
}
static get ["computedname"]() {
return "";
}
get ["computedname1"]() {
return "";
}
get ["computedname2"]() {
retur... | {
"end_byte": 535,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithGetterSetterInES6.ts"
} |
TypeScript/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing3.ts_3_301 | ass Base {
constructor(c) { }
}
class D extends Base {
private _t;
constructor() {
let x = () => { this._t };
x(); // no error; we only check super is called before this when the container is a constructor
this._t; // error
super(undefined);
}
}
| {
"end_byte": 301,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing3.ts"
} |
TypeScript/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing7.ts_3_186 | ass Base {
constructor(c) { }
}
class D extends Base {
private _t;
constructor() {
let x = {
j: this._t,
}
super(undefined);
}
}
| {
"end_byte": 186,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing7.ts"
} |
TypeScript/tests/cases/conformance/es6/classDeclaration/classWithSemicolonClassElementES61.ts_0_32 | //@target: es6
class C {
;
} | {
"end_byte": 32,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/classDeclaration/classWithSemicolonClassElementES61.ts"
} |
TypeScript/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing6.ts_3_130 | ass Base {
constructor(c) { }
}
class D extends Base {
private _t;
constructor() {
super(this);
}
}
| {
"end_byte": 130,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing6.ts"
} |
TypeScript/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithConstructorInES6.ts_3_363 | @target: es6
class A {
y: number;
constructor(x: number) {
}
foo(a: any);
foo() { }
}
class B {
y: number;
x: string = "hello";
_bar: string;
constructor(x: number, z = "hello", ...args) {
this.y = 10;
}
baz(...args): string;
baz(z: string, v: number): string {... | {
"end_byte": 363,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithConstructorInES6.ts"
} |
TypeScript/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithPropertyAccessInHeritageClause1.ts_0_77 | class B {}
function foo() {
return {B: B};
}
class C extends (foo()).B {} | {
"end_byte": 77,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithPropertyAccessInHeritageClause1.ts"
} |
TypeScript/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing2.ts_3_213 | ass Base {
constructor(c) { }
}
class D extends Base {
private _t;
constructor() {
super(() => { this._t }); // no error. only check when this is directly accessing in constructor
}
}
| {
"end_byte": 213,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing2.ts"
} |
TypeScript/tests/cases/conformance/es6/classDeclaration/classWithSemicolonClassElementES62.ts_0_38 | //@target: es6
class C {
;
;
} | {
"end_byte": 38,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/classDeclaration/classWithSemicolonClassElementES62.ts"
} |
TypeScript/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithLiteralPropertyNameInES6.ts_3_289 | @target: es6
class B {
"hello" = 10;
0b110 = "world";
0o23534 = "WORLD";
20 = "twenty";
"foo"() { }
0b1110() {}
11() { }
interface() { }
static "hi" = 10000;
static 22 = "twenty-two";
static 0b101 = "binary";
static 0o3235 = "octal";
} | {
"end_byte": 289,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithLiteralPropertyNameInES6.ts"
} |
TypeScript/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing5.ts_3_100 | ass D extends null {
private _t;
constructor() {
this._t; // No error
}
}
| {
"end_byte": 100,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing5.ts"
} |
TypeScript/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithSuperMethodCall01.ts_3_136 | @target: es6
class Parent {
foo() {
}
}
class Foo extends Parent {
foo() {
var x = () => super.foo();
}
} | {
"end_byte": 136,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithSuperMethodCall01.ts"
} |
TypeScript/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing1.ts_3_238 | clare var Factory: any
class Base {
constructor(c) { }
}
class D extends Base {
private _t;
constructor() {
super(i);
var s = {
t: this._t
}
var i = Factory.create(s);
}
}
| {
"end_byte": 238,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing1.ts"
} |
TypeScript/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithExtensionInES6.ts_3_316 | @target: es6
class B {
baz(a: string, y = 10) { }
}
class C extends B {
foo() { }
baz(a: string, y:number) {
super.baz(a, y);
}
}
class D extends C {
constructor() {
super();
}
foo() {
super.foo();
}
baz() {
super.baz("hello", 10);
}
}
| {
"end_byte": 316,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithExtensionInES6.ts"
} |
TypeScript/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithTypeArgumentAndOverloadInES6.ts_3_335 | @target: es6
class B<T> {
x: T;
B: T;
constructor(a: any)
constructor(a: any,b: T)
constructor(a: T) { this.B = a;}
foo(a: T)
foo(a: any)
foo(b: string)
foo(): T {
return this.x;
}
get BB(): T {
return this.B;
}
set BBWith(c: T) {
this.B = ... | {
"end_byte": 335,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithTypeArgumentAndOverloadInES6.ts"
} |
TypeScript/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing4.ts_3_205 | ass D extends null {
private _t;
constructor() {
this._t;
super();
}
}
class E extends null {
private _t;
constructor() {
super();
this._t;
}
} | {
"end_byte": 205,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing4.ts"
} |
TypeScript/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationOverloadInES6.ts_3_167 | @target: es6
class C {
constructor(y: any)
constructor(x: number) {
}
}
class D {
constructor(y: any)
constructor(x: number, z="hello") {}
} | {
"end_byte": 167,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationOverloadInES6.ts"
} |
TypeScript/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithPropertyAssignmentInES6.ts_3_337 | @target:es6
class C {
x: string = "Hello world";
}
class D {
x: string = "Hello world";
y: number;
constructor() {
this.y = 10;
}
}
class E extends D{
z: boolean = true;
}
class F extends D{
z: boolean = true;
j: string;
constructor() {
super();
this.j = "... | {
"end_byte": 337,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithPropertyAssignmentInES6.ts"
} |
TypeScript/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithThisKeywordInES6.ts_3_255 | @target: es6
class B {
x = 10;
constructor() {
this.x = 10;
}
static log(a: number) { }
foo() {
B.log(this.x);
}
get X() {
return this.x;
}
set bX(y: number) {
this.x = y;
}
} | {
"end_byte": 255,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithThisKeywordInES6.ts"
} |
TypeScript/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithStaticPropertyAssignmentInES6.ts_3_109 | @target:es6
class C {
static z: string = "Foo";
}
class D {
x = 20000;
static b = true;
}
| {
"end_byte": 109,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithStaticPropertyAssignmentInES6.ts"
} |
TypeScript/tests/cases/conformance/es6/classDeclaration/exportDefaultClassWithStaticPropertyAssignmentsInES6.ts_0_69 | // @target:es6
export default class {
static z: string = "Foo";
} | {
"end_byte": 69,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/classDeclaration/exportDefaultClassWithStaticPropertyAssignmentsInES6.ts"
} |
TypeScript/tests/cases/conformance/es6/classDeclaration/superCallFromClassThatHasNoBaseTypeButWithSameSymbolInterface.ts_0_106 | interface Foo extends Array<number> {}
class Foo {
constructor() {
super(); // error
}
}
| {
"end_byte": 106,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/classDeclaration/superCallFromClassThatHasNoBaseTypeButWithSameSymbolInterface.ts"
} |
TypeScript/tests/cases/conformance/es6/functionExpressions/FunctionExpression1_es6.ts_0_41 | // @target: es6
var v = function * () { } | {
"end_byte": 41,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/functionExpressions/FunctionExpression1_es6.ts"
} |
TypeScript/tests/cases/conformance/es6/functionExpressions/FunctionExpression2_es6.ts_0_44 | // @target: es6
var v = function * foo() { } | {
"end_byte": 44,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/functionExpressions/FunctionExpression2_es6.ts"
} |
TypeScript/tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration5_es6.ts_0_32 | // @target: es6
class C {
*
} | {
"end_byte": 32,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration5_es6.ts"
} |
TypeScript/tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration7_es6.ts_0_44 | // @target: es6
class C {
*foo<T>() { }
} | {
"end_byte": 44,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration7_es6.ts"
} |
TypeScript/tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts_0_43 | // @target: es6
class C {
*[foo]() { }
} | {
"end_byte": 43,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts"
} |
TypeScript/tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration1_es6.ts_0_41 | // @target: es6
class C {
*foo() { }
} | {
"end_byte": 41,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration1_es6.ts"
} |
TypeScript/tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration8_es6.ts_0_154 | // @target: es6
class C {
foo() {
// Make sure we don't think of *bar as the start of a generator method.
if (a) ¬ * bar;
return bar;
}
} | {
"end_byte": 154,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration8_es6.ts"
} |
TypeScript/tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration4_es6.ts_0_38 | // @target: es6
class C {
*() { }
} | {
"end_byte": 38,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration4_es6.ts"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.