_id stringlengths 21 254 | text stringlengths 1 93.7k | metadata dict |
|---|---|---|
TypeScript/tests/cases/conformance/salsa/typeFromPropertyAssignment6.ts_0_323 | // @noEmit: true
// @allowJs: true
// @checkJs: true
// @target: es6
// @Filename: def.js
class Outer {}
// @Filename: a.js
Outer.Inner = class I {
messages() { return [] }
}
/** @type {!Outer.Inner} */
Outer.i
// @Filename: b.js
var msgs = Outer.i.messages()
/** @param {Outer.Inner} inner */
function x(inner) {... | {
"end_byte": 323,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/typeFromPropertyAssignment6.ts"
} |
TypeScript/tests/cases/conformance/salsa/typeFromPropertyAssignment25.ts_0_320 | // @noEmit: true
// @checkJs: true
// @allowJs: true
// @Filename: bug24703.js
var Common = {};
Common.I = class {
constructor() {
this.i = 1
}
}
Common.O = class extends Common.I {
constructor() {
super()
this.o = 2
}
}
var o = new Common.O()
var i = new Common.I()
o.i
o.o
i.i
| {
"end_byte": 320,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/typeFromPropertyAssignment25.ts"
} |
TypeScript/tests/cases/conformance/salsa/typeFromPropertyAssignment35.ts_0_361 | // @noEmit: true
// @allowJs: true
// @checkJs: true
// @Filename: bug26877.js
/** @param {Emu.D} x */
function ollKorrect(x) {
x._model
const y = new Emu.D()
const z = Emu.D._wrapperInstance;
}
Emu.D = class {
constructor() {
this._model = 1
}
}
// @Filename: second.js
var Emu = {}
/** @t... | {
"end_byte": 361,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/typeFromPropertyAssignment35.ts"
} |
TypeScript/tests/cases/conformance/salsa/conflictingCommonJSES2015Exports.ts_0_217 | // @checkJs: true
// @allowJS: true
// @noEmit: true
// @Filename: bug24934.js
export function abc(a, b, c) { return 5; }
module.exports = { abc };
// @Filename: use.js
import { abc } from './bug24934';
abc(1, 2, 3);
| {
"end_byte": 217,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/conflictingCommonJSES2015Exports.ts"
} |
TypeScript/tests/cases/conformance/salsa/plainJSGrammarErrors3.ts_0_186 | // @outdir: out/
// @target: esnext
// @module: esnext
// @allowJs: true
// @filename: plainJSGrammarErrors3.js
// @filename: /a.js
function foo() {
await new Promise(undefined);
}
| {
"end_byte": 186,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/plainJSGrammarErrors3.ts"
} |
TypeScript/tests/cases/conformance/salsa/moduleExportAlias4.ts_0_162 | // @checkJs: true
// @noEmit: true
// @Filename: bug24024.js
// #24024
var wat = require('./bug24024')
module.exports = class C {}
module.exports.D = class D { }
| {
"end_byte": 162,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/moduleExportAlias4.ts"
} |
TypeScript/tests/cases/conformance/salsa/inferringClassMembersFromAssignments5.ts_0_383 | // @noEmit: true
// @allowJs: true
// @checkJs: true
// @noImplicitAny: true
// @strictNullChecks: true
// @Filename: a.js
class Base {
m() {
this.p = 1
}
}
class Derived extends Base {
constructor() {
super();
// should be OK, and p should have type number from this assignment
... | {
"end_byte": 383,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/inferringClassMembersFromAssignments5.ts"
} |
TypeScript/tests/cases/conformance/salsa/exportDefaultInJsFile01.ts_0_105 | // @allowJS: true
// @target: es5
// @module: commonjs
// @filename: myFile01.js
export default "hello"; | {
"end_byte": 105,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/exportDefaultInJsFile01.ts"
} |
TypeScript/tests/cases/conformance/salsa/moduleExportAssignment4.ts_0_146 | // @noEmit: true
// @allowJs: true
// @checkJs: true
// @Filename: async.js
exports.default = { m: 1, a: 1 }
module.exports = exports['default'];
| {
"end_byte": 146,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/moduleExportAssignment4.ts"
} |
TypeScript/tests/cases/conformance/salsa/typeFromPropertyAssignment2.ts_0_251 | // @noEmit: true
// @allowJs: true
// @checkJs: true
// @Filename: a.js
function Outer() {
this.y = 2
}
Outer.Inner = class I {
constructor() {
this.x = 1
}
}
/** @type {Outer} */
var ok
ok.y
/** @type {Outer.Inner} */
var oc
oc.x
| {
"end_byte": 251,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/typeFromPropertyAssignment2.ts"
} |
TypeScript/tests/cases/conformance/salsa/typeFromPropertyAssignment21.ts_0_274 | // @allowJs: true
// @checkJs: true
// @noEmit: true
// @lib: dom, es5
// @Filename: chrome-devtools-DOMExtension.js
// Extend that DOM! (doesn't work, but shouldn't crash)
Event.prototype.removeChildren = function () {
this.textContent = 'nope, not going to happen'
}
| {
"end_byte": 274,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/typeFromPropertyAssignment21.ts"
} |
TypeScript/tests/cases/conformance/salsa/typeFromPropertyAssignment15.ts_0_271 | // @noEmit: true
// @allowJs: true
// @checkJs: true
// @Filename: a.js
var Outer = {};
Outer.Inner = class {
constructor() {
this.x = 1
}
m() { }
}
/** @type {Outer.Inner} */
var inner
inner.x
inner.m()
var inno = new Outer.Inner()
inno.x
inno.m()
| {
"end_byte": 271,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/typeFromPropertyAssignment15.ts"
} |
TypeScript/tests/cases/conformance/salsa/binderUninitializedModuleExportsAssignment.ts_0_138 | // @noEmit: true
// @allowJs: true
// @checkJs: true
// @Filename: loop.js
var loop1 = loop2;
var loop2 = loop1;
module.exports = loop2;
| {
"end_byte": 138,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/binderUninitializedModuleExportsAssignment.ts"
} |
TypeScript/tests/cases/conformance/salsa/typeFromPropertyAssignment31.ts_0_789 | function ExpandoMerge(n: number) {
return n;
}
ExpandoMerge.p1 = 111
ExpandoMerge.m = function(n: number) {
return n + 1;
}
namespace ExpandoMerge {
export var p2 = 222;
}
ExpandoMerge.p4 = 44444; // ok
ExpandoMerge.p6 = 66666; // ok
ExpandoMerge.p8 = false; // type error
namespace ExpandoMerge {
export... | {
"end_byte": 789,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/typeFromPropertyAssignment31.ts"
} |
TypeScript/tests/cases/conformance/salsa/varRequireFromJavascript.ts_0_413 | // @allowJs: true
// @checkJs: true
// @strict: true
// @noEmit: true
// @Filename: ex.js
export class Crunch {
/** @param {number} n */
constructor(n) {
this.n = n
}
m() {
return this.n
}
}
// @Filename: use.js
var ex = require('./ex')
// values work
var crunch = new ex.Crunch(1);... | {
"end_byte": 413,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/varRequireFromJavascript.ts"
} |
TypeScript/tests/cases/conformance/salsa/prototypePropertyAssignmentMergeWithInterfaceMethod.ts_0_659 | // @noEmit: true
// @allowJs: true
// @checkJs: true
// @Filename: lovefield-ts.d.ts
// bug #27352, crashes from github.com/google/lovefield
declare namespace lf {
export interface Transaction {
attach(query: query.Builder): Promise<Array<Object>>
begin(scope: Array<schema.Table>): Promise<void>
commit():... | {
"end_byte": 659,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/prototypePropertyAssignmentMergeWithInterfaceMethod.ts"
} |
TypeScript/tests/cases/conformance/salsa/mixedPropertyElementAccessAssignmentDeclaration.ts_0_63 | // Should not crash: #34642
var arr = [];
arr[0].prop[2] = {};
| {
"end_byte": 63,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/mixedPropertyElementAccessAssignmentDeclaration.ts"
} |
TypeScript/tests/cases/conformance/salsa/moduleExportAssignment3.ts_0_238 | // @noEmit: true
// @allowJs: true
// @checkJs: true
// @Filename: mod.js
module.exports = function x() { }
module.exports() // should be callable
// @Filename: npm.js
var mod = require('./mod')
mod() // should be callable from here too
| {
"end_byte": 238,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/moduleExportAssignment3.ts"
} |
TypeScript/tests/cases/conformance/salsa/inferringClassMembersFromAssignments2.ts_0_145 | // @checkJs: true
// @noEmit: true
// @filename: a.js
OOOrder.prototype.m = function () {
this.p = 1
}
function OOOrder() {
this.x = 1
}
| {
"end_byte": 145,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/inferringClassMembersFromAssignments2.ts"
} |
TypeScript/tests/cases/conformance/salsa/typeFromPropertyAssignment12.ts_0_306 | // @noEmit: true
// @allowJs: true
// @checkJs: true
// @target: es6
// @Filename: module.js
var Outer = function(element, config) {};
// @Filename: usage.js
/** @constructor */
Outer.Pos = function (line, ch) {};
/** @type {number} */
Outer.Pos.prototype.line;
var pos = new Outer.Pos(1, 'x');
pos.line;
| {
"end_byte": 306,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/typeFromPropertyAssignment12.ts"
} |
TypeScript/tests/cases/conformance/salsa/typeFromPropertyAssignment26.ts_0_366 | // @noEmit: true
// @noImplicitAny: true
// @checkJs: true
// @allowJs: true
// @Filename: bug24730.js
var UI = {}
UI.TreeElement = class {
constructor() {
this.treeOutline = 12
}
};
UI.context = new UI.TreeElement()
class C extends UI.TreeElement {
onpopulate() {
this.doesNotExist
... | {
"end_byte": 366,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/typeFromPropertyAssignment26.ts"
} |
TypeScript/tests/cases/conformance/salsa/nestedPrototypeAssignment.ts_0_172 | // @noEmit: true
// @allowJs: true
// @checkJs: true
// @noImplicitAny: true
// @Filename: mod.js
// #24111 -- shouldn't assert
C.prototype = {}
C.prototype.bar.foo = {};
| {
"end_byte": 172,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/nestedPrototypeAssignment.ts"
} |
TypeScript/tests/cases/conformance/salsa/typeFromPropertyAssignment5.ts_0_240 | // @noEmit: true
// @allowJs: true
// @checkJs: true
// @Filename: a.js
// @target: es6
export default function MyClass() {
}
MyClass.bar = class C {
}
MyClass.bar
// @Filename: b.js
import MC from './a'
MC.bar
/** @type {MC.bar} */
var x
| {
"end_byte": 240,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/typeFromPropertyAssignment5.ts"
} |
TypeScript/tests/cases/conformance/salsa/typeFromPropertyAssignment36.ts_0_850 | // @strict: true
function f(b: boolean) {
function d() {
}
d.e = 12
d.e
if (b) {
d.q = false
}
// error d.q might not be assigned
d.q
if (b) {
d.q = false
}
else {
d.q = true
}
d.q
if (b) {
d.r = 1
}
else {
d.r = 2
... | {
"end_byte": 850,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/typeFromPropertyAssignment36.ts"
} |
TypeScript/tests/cases/conformance/salsa/prototypePropertyAssignmentMergeAcrossFiles2.ts_0_346 | // @Filename: prototypePropertyAssignmentMergeAcrossFiles2.js
// @allowJs: true
// @checkJs: true
// @noEmit: true
var Ns = {}
Ns.One = function() {};
Ns.Two = function() {};
Ns.One.prototype = {
ok() {},
};
Ns.Two.prototype = {
}
// @Filename: other.js
/**
* @type {Ns.One}
*/
var one;
one.wat;
/**
* @type {Ns.T... | {
"end_byte": 346,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/prototypePropertyAssignmentMergeAcrossFiles2.ts"
} |
TypeScript/tests/cases/conformance/salsa/reExportJsFromTs.ts_0_206 | // @allowJs: true
// @outDir: out
// @Filename: /lib/constants.js
module.exports = {
str: 'x',
};
// @Filename: /src/constants.ts
import * as tsConstants from "../lib/constants";
export { tsConstants }; | {
"end_byte": 206,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/reExportJsFromTs.ts"
} |
TypeScript/tests/cases/conformance/salsa/constructorNameInGenerator.ts_0_54 | // @target: esnext
class C2 {
*constructor() {}
}
| {
"end_byte": 54,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/constructorNameInGenerator.ts"
} |
TypeScript/tests/cases/conformance/salsa/propertyAssignmentUseParentType3.ts_0_325 | // don't use the parent type if it's a function declaration (#33741)
function foo1(): number {
return 123;
}
foo1.toFixed = "";
function foo2(): any[] {
return [];
}
foo2.join = "";
function foo3(): string {
return "";
}
foo3.trim = "";
function foo4(): ({x: number}) {
return {x: 123};
}
foo4.x = "4... | {
"end_byte": 325,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/propertyAssignmentUseParentType3.ts"
} |
TypeScript/tests/cases/conformance/salsa/exportDefaultInJsFile02.ts_0_106 | // @allowJS: true
// @target: es2015
// @module: es2015
// @filename: myFile02.js
export default "hello"; | {
"end_byte": 106,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/exportDefaultInJsFile02.ts"
} |
TypeScript/tests/cases/conformance/salsa/moduleExportAssignment7.ts_0_1797 | // @noEmit: true
// @allowJs: true
// @checkJs: true
// @Filename: mod.js
class Thing { x = 1 }
class AnotherThing { y = 2 }
function foo() { return 3 }
function bar() { return 4 }
/** @typedef {() => number} buz */
module.exports = {
Thing,
AnotherThing,
foo,
qux: bar,
baz() { return 5 },
lit... | {
"end_byte": 1797,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/moduleExportAssignment7.ts"
} |
TypeScript/tests/cases/conformance/salsa/inferringClassMembersFromAssignments6.ts_0_396 | // @noEmit: true
// @allowJs: true
// @checkJs: true
// @noImplicitAny: true
// @strictNullChecks: true
// @Filename: inferringClassMembersFromAssignments6.js
function Foonly() {
var self = this
self.x = 1
self.m = function() {
console.log(self.x)
}
}
Foonly.prototype.mreal = function() {
va... | {
"end_byte": 396,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/inferringClassMembersFromAssignments6.ts"
} |
TypeScript/tests/cases/conformance/salsa/privateConstructorFunction.ts_0_320 | // @allowjs: true
// @checkjs: true
// @outdir: salsa
// @declaration: true
// @filename: privateConstructorFunction.js
{
// make sure not to crash when parent's a block rather than a source file or some other
// symbol-having node.
/** @private */
function C() {
this.x = 1
}
new C()
}
| {
"end_byte": 320,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/privateConstructorFunction.ts"
} |
TypeScript/tests/cases/conformance/salsa/moduleExportPropertyAssignmentDefault.ts_0_179 | // @noEmit: true
// @allowJs: true
// @checkJs: true
// @Filename: axios.js
var axios = {}
module.exports = axios // both assignments should be ok
module.exports.default = axios
| {
"end_byte": 179,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/moduleExportPropertyAssignmentDefault.ts"
} |
TypeScript/tests/cases/conformance/salsa/typeFromPropertyAssignment22.ts_0_426 | // @allowJs: true
// @checkJs: true
// @noEmit: true
// @strictNullChecks: true
// @Filename: npm-install.js
function Installer () {
this.args = 0
}
Installer.prototype.loadArgMetadata = function (next) {
// ArrowFunction isn't treated as a this-container
(args) => {
this.args = 'hi'
this.ne... | {
"end_byte": 426,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/typeFromPropertyAssignment22.ts"
} |
TypeScript/tests/cases/conformance/salsa/typeFromPropertyAssignmentOutOfOrder.ts_0_329 | // @noEmit: true
// @allowJs: true
// @checkJs: true
// @target: es5
// @filename: index.js
First.Item = class I {}
Common.Object = class extends First.Item {}
Workspace.Object = class extends Common.Object {}
/** @type {Workspace.Object} */
var am;
// @filename: roots.js
var First = {};
var Common = {};
var Workspa... | {
"end_byte": 329,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/typeFromPropertyAssignmentOutOfOrder.ts"
} |
TypeScript/tests/cases/conformance/salsa/typeFromPropertyAssignment16.ts_0_269 | // @noEmit: true
// @allowJs: true
// @checkJs: true
// @Filename: a.js
var Outer = {};
Outer.Inner = function () {}
Outer.Inner.prototype = {
x: 1,
m() { }
}
/** @type {Outer.Inner} */
var inner
inner.x
inner.m()
var inno = new Outer.Inner()
inno.x
inno.m()
| {
"end_byte": 269,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/typeFromPropertyAssignment16.ts"
} |
TypeScript/tests/cases/conformance/salsa/moduleExportAlias3.ts_0_129 | // @checkJs: true
// @allowJS: true
// @noEmit: true
// @Filename: bug24062.js
// #24062
class C {
}
module.exports = {
C
};
| {
"end_byte": 129,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/moduleExportAlias3.ts"
} |
TypeScript/tests/cases/conformance/salsa/propertyAssignmentOnImportedSymbol.ts_0_169 | // @allowJs: true
// @checkJs: true
// @noEmit: true
// @Filename: mod1.js
export var hurk = {}
// @Filename: bug24658.js
import { hurk } from './mod1'
hurk.expando = 4
| {
"end_byte": 169,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/propertyAssignmentOnImportedSymbol.ts"
} |
TypeScript/tests/cases/conformance/salsa/thisPropertyAssignmentInherited.ts_0_501 | // @checkJs: true
// @strict: true
// @emitDeclarationOnly: true
// @declaration: true
// @Filename: thisPropertyAssignmentInherited.js
export class Element {
/**
* @returns {String}
*/
get textContent() {
return ''
}
set textContent(x) {}
cloneNode() { return this}
}
export class HTMLElement exten... | {
"end_byte": 501,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/thisPropertyAssignmentInherited.ts"
} |
TypeScript/tests/cases/conformance/salsa/plainJSGrammarErrors4.ts_0_197 | // @outdir: out/
// @target: esnext
// @module: esnext
// @allowJs: true
// @filename: plainJSGrammarErrors4.js
class A {
#a;
m() {
this.#a; // ok
this.#b; // error
}
}
| {
"end_byte": 197,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/plainJSGrammarErrors4.ts"
} |
TypeScript/tests/cases/conformance/salsa/plainJSRedeclare3.ts_0_154 | // @outdir: out/
// @allowJS: true
// @checkJS: false
// @filename: plainJSRedeclare.js
const orbitol = 1
var orbitol = 1 + false
orbitol.toExponential()
| {
"end_byte": 154,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/plainJSRedeclare3.ts"
} |
TypeScript/tests/cases/conformance/salsa/typeFromPropertyAssignment32.ts_0_811 | // @Filename: expando.ts
function ExpandoMerge(n: number) {
return n;
}
ExpandoMerge.p1 = 111
ExpandoMerge.m = function(n: number) {
return n + 1;
}
ExpandoMerge.p4 = 44444;
ExpandoMerge.p5 = 555555;
ExpandoMerge.p6 = 66666;
ExpandoMerge.p7 = 777777;
ExpandoMerge.p8 = false; // type error
ExpandoMerge.p9 = fals... | {
"end_byte": 811,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/typeFromPropertyAssignment32.ts"
} |
TypeScript/tests/cases/conformance/salsa/moduleExportWithExportPropertyAssignment2.ts_0_441 | // @noEmit: true
// @allowJs: true
// @checkJs: true
// @Filename: requires.d.ts
declare var module: { exports: any };
declare function require(name: string): any;
// @Filename: mod1.js
/// <reference path='./requires.d.ts' />
module.exports = 1
module.exports.f = function () { }
// @Filename: a.js
/// <reference path... | {
"end_byte": 441,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/moduleExportWithExportPropertyAssignment2.ts"
} |
TypeScript/tests/cases/conformance/salsa/moduleExportAssignment6.ts_0_568 | // @noEmit: true
// @allowJs: true
// @checkJs: true
// @Filename: webpackLibNormalModule.js
class C {
/** @param {number} x */
constructor(x) {
this.x = x
this.exports = [x]
}
/** @param {number} y */
m(y) {
return this.x + y
}
}
function exec() {
const module = new ... | {
"end_byte": 568,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/moduleExportAssignment6.ts"
} |
TypeScript/tests/cases/conformance/salsa/classCanExtendConstructorFunction.ts_0_2337 | // @noEmit: true
// @allowJs: true
// @checkJs: true
// @Filename: first.js
/**
* @constructor
* @param {number} numberOxen
*/
function Wagon(numberOxen) {
this.numberOxen = numberOxen
}
/** @param {Wagon[]=} wagons */
Wagon.circle = function (wagons) {
return wagons ? wagons.length : 3.14;
}
/** @param {*[]... | {
"end_byte": 2337,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/classCanExtendConstructorFunction.ts"
} |
TypeScript/tests/cases/conformance/salsa/plainJSBinderErrors.ts_0_772 | // @outdir: out/
// @target: esnext
// @allowJS: true
// @filename: plainJSBinderErrors.js
export default 12
export default 13
const await = 1
const yield = 2
async function f() {
const await = 3
}
function* g() {
const yield = 4
}
class C {
#constructor = 5
deleted() {
function container(f) {
... | {
"end_byte": 772,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/plainJSBinderErrors.ts"
} |
TypeScript/tests/cases/conformance/salsa/thisPropertyAssignmentCircular.ts_0_397 | // @allowJs: true
// @checkJs: true
// @declaration: true
// @emitDeclarationOnly: true
// @filename: thisPropertyAssignmentCircular.js
export class Foo {
constructor() {
this.foo = "Hello";
}
slicey() {
this.foo = this.foo.slice();
}
m() {
this.foo
}
}
/** @class */
fun... | {
"end_byte": 397,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/thisPropertyAssignmentCircular.ts"
} |
TypeScript/tests/cases/conformance/salsa/inferringClassMembersFromAssignments7.ts_0_407 | // @noEmit: true
// @allowJs: true
// @checkJs: true
// @noImplicitAny: true
// @strictNullChecks: true
// @Filename: inferringClassMembersFromAssignments7.js
class C {
constructor() {
var self = this
self.x = 1
self.m = function() {
console.log(self.x)
}
}
mreal(... | {
"end_byte": 407,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/inferringClassMembersFromAssignments7.ts"
} |
TypeScript/tests/cases/conformance/salsa/multipleDeclarations.ts_0_602 | // @filename: input.js
// @outFile: output.js
// @allowJs: true
function C() {
this.m = null;
}
C.prototype.m = function() {
this.nothing();
}
class X {
constructor() {
this.m = this.m.bind(this);
this.mistake = 'frankly, complete nonsense';
}
m() {
}
mistake() {
}
}
let ... | {
"end_byte": 602,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/multipleDeclarations.ts"
} |
TypeScript/tests/cases/conformance/salsa/jsContainerMergeJsContainer.ts_0_157 | // @noEmit: true
// @allowJs: true
// @checkJs: true
// #24131
// @Filename: a.js
const a = {};
a.d = function() {};
// @Filename: b.js
a.d.prototype = {};
| {
"end_byte": 157,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/jsContainerMergeJsContainer.ts"
} |
TypeScript/tests/cases/conformance/salsa/typeFromPropertyAssignment23.ts_0_658 | // @noEmit: true
// @checkJs: true
// @allowJs: true
// @Filename: a.js
class B {
constructor () {
this.n = 1
}
foo() {
}
}
class C extends B { }
// this override should be fine (even if it's a little odd)
C.prototype.foo = function() {
}
class D extends B { }
D.prototype.foo = () => {
t... | {
"end_byte": 658,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/typeFromPropertyAssignment23.ts"
} |
TypeScript/tests/cases/conformance/salsa/typeFromPropertyAssignment17.ts_0_580 | // @noEmit: true
// @allowJs: true
// @checkJs: true
// @Filename: types.d.ts
declare var require: any;
declare var module: any;
// @Filename: minimatch.js
/// <reference path='./types.d.ts'/>
module.exports = minimatch
minimatch.M = M
minimatch.filter = filter
function filter() {
return minimatch()
}
function mini... | {
"end_byte": 580,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/typeFromPropertyAssignment17.ts"
} |
TypeScript/tests/cases/conformance/salsa/moduleExportAlias2.ts_0_448 | // @checkJs: true
// @allowJS: true
// @noEmit: true
// @Filename: node.d.ts
declare function require(name: string): any;
declare var exports: any;
declare var module: { exports: any };
// @Filename: semver.js
/// <reference path='node.d.ts' />
exports = module.exports = C
exports.f = n => n + 1
function C() {
this... | {
"end_byte": 448,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/moduleExportAlias2.ts"
} |
TypeScript/tests/cases/conformance/salsa/typeFromParamTagForFunction.ts_0_1379 | // @allowJs: true
// @checkJs: true
// @noEmit: true
// @module: commonjs
// @filename: node.d.ts
declare function require(id: string): any;
declare var module: any, exports: any;
// @filename: a-ext.js
exports.A = function () {
this.x = 1;
};
// @filename: a.js
const { A } = require("./a-ext");
/** @param {A} p... | {
"end_byte": 1379,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/typeFromParamTagForFunction.ts"
} |
TypeScript/tests/cases/conformance/salsa/plainJSRedeclare2.ts_0_153 | // @outdir: out/
// @allowJS: true
// @checkJS: true
// @filename: plainJSRedeclare.js
const orbitol = 1
var orbitol = 1 + false
orbitol.toExponential()
| {
"end_byte": 153,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/plainJSRedeclare2.ts"
} |
TypeScript/tests/cases/conformance/salsa/typeFromPropertyAssignment33.ts_0_813 | // @Filename: ns.ts
namespace ExpandoMerge {
export var p3 = 333;
export var p4 = 4;
export var p5 = 5;
export let p6 = 6;
export let p7 = 7;
export var p8 = 6;
export let p9 = 7;
}
namespace ExpandoMerge {
export var p2 = 222;
}
// @Filename: expando.ts
function ExpandoMerge(n: number... | {
"end_byte": 813,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/typeFromPropertyAssignment33.ts"
} |
TypeScript/tests/cases/conformance/salsa/moduleExportWithExportPropertyAssignment3.ts_0_698 | // @noEmit: true
// @allowJs: true
// @checkJs: true
// @Filename: requires.d.ts
declare var module: { exports: any };
declare function require(name: string): any;
// @Filename: mod1.js
/// <reference path='./requires.d.ts' />
module.exports.bothBefore = 'string'
module.exports = {
justExport: 1,
bothBefore: 2,... | {
"end_byte": 698,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/moduleExportWithExportPropertyAssignment3.ts"
} |
TypeScript/tests/cases/conformance/salsa/typeFromJSConstructor.ts_0_946 | // @allowJs: true
// @checkJs: true
// @noEmit: true
// @strictNullChecks: true
// @noImplicitAny: true
// @Filename: a.js
function Installer () {
// arg: number
this.arg = 0
// unknown: string | boolean | null
this.unknown = null
// twice: string | undefined
this.twice = undefined
this.twic... | {
"end_byte": 946,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/typeFromJSConstructor.ts"
} |
TypeScript/tests/cases/conformance/salsa/jsObjectsMarkedAsOpenEnded.ts_0_472 | // @outFile: output.js
// @allowJs: true
// @filename: a.js
var variable = {};
variable.a = 0;
class C {
initializedMember = {};
constructor() {
this.member = {};
this.member.a = 0;
}
}
var obj = {
property: {}
};
obj.property.a = 0;
var arr = [{}];
function getObj() {
return {... | {
"end_byte": 472,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/jsObjectsMarkedAsOpenEnded.ts"
} |
TypeScript/tests/cases/conformance/salsa/checkSpecialPropertyAssignments.ts_0_238 | // @noEmit: true
// @checkJs: true
// @allowJs: true
// @Filename: bug24252.js
var A = {};
A.B = class {
m() {
/** @type {string[]} */
var x = [];
/** @type {number[]} */
var y;
y = x;
}
};
| {
"end_byte": 238,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/checkSpecialPropertyAssignments.ts"
} |
TypeScript/tests/cases/conformance/salsa/contextualTypedSpecialAssignment.ts_0_1236 | // @checkJs: true
// @allowJs: true
// @noEmit: true
// @Filename: test.js
// @strict: true
/** @typedef {{
status: 'done'
m(n: number): void
}} DoneStatus */
// property assignment
var ns = {}
/** @type {DoneStatus} */
ns.x = {
status: 'done',
m(n) { }
}
ns.x = {
status: 'done',
m(n) { }
}
ns... | {
"end_byte": 1236,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/contextualTypedSpecialAssignment.ts"
} |
TypeScript/tests/cases/conformance/salsa/moduleExportAssignment2.ts_0_251 | // @noEmit: true
// @allowJs: true
// @checkJs: true
// @Filename: npm.js
var npm = module.exports = function (tree) {
}
module.exports.asReadInstalled = function (tree) {
npm(tree) // both references should be callable
module.exports(tree)
}
| {
"end_byte": 251,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/moduleExportAssignment2.ts"
} |
TypeScript/tests/cases/conformance/salsa/inferringClassMembersFromAssignments3.ts_0_249 | // @noEmit: true
// @allowJs: true
// @checkJs: true
// @noImplicitAny: true
// @strictNullChecks: true
// @Filename: a.js
class Base {
constructor() {
this.p = 1
}
}
class Derived extends Base {
m() {
this.p = 1
}
}
| {
"end_byte": 249,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/inferringClassMembersFromAssignments3.ts"
} |
TypeScript/tests/cases/conformance/salsa/typeFromPropertyAssignment13.ts_0_363 | // @noEmit: true
// @allowJs: true
// @checkJs: true
// @target: es6
// @Filename: module.js
var Outer = {}
Outer.Inner = function() {}
Outer.Inner.prototype = {
m() { },
i: 1
}
// incremental assignments still work
Outer.Inner.prototype.j = 2
/** @type {string} */
Outer.Inner.prototype.k;
var inner = new Outer... | {
"end_byte": 363,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/typeFromPropertyAssignment13.ts"
} |
TypeScript/tests/cases/conformance/salsa/typeFromPropertyAssignment27.ts_0_203 | // @noEmit: true
// @allowJs: true
// @checkJs: true
// @Filename: a.js
// mixed prototype-assignment+function declaration
function C() { this.p = 1; }
C.prototype = { q: 2 };
const c = new C()
c.p
c.q
| {
"end_byte": 203,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/typeFromPropertyAssignment27.ts"
} |
TypeScript/tests/cases/conformance/salsa/constructorFunctionMergeWithClass.ts_0_215 | // @allowJs: true
// @noEmit: true
// @checkJs: true
// @Filename: file1.js
var SomeClass = function () {
this.otherProp = 0;
};
new SomeClass();
// @Filename: file2.js
class SomeClass { }
SomeClass.prop = 0
| {
"end_byte": 215,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/constructorFunctionMergeWithClass.ts"
} |
TypeScript/tests/cases/conformance/salsa/typeFromPropertyAssignment4.ts_0_382 | // @noEmit: true
// @allowJs: true
// @checkJs: true
// @Filename: def.js
var Outer = {};
// @Filename: a.js
Outer.Inner = class {
constructor() {
/** @type {number} */
this.y = 12
}
}
/** @type {Outer.Inner} */
var local
local.y
var inner = new Outer.Inner()
inner.y
// @Filename: b.js
/** @... | {
"end_byte": 382,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/typeFromPropertyAssignment4.ts"
} |
TypeScript/tests/cases/conformance/salsa/typeFromPropertyAssignment37.ts_0_289 | // @noEmit: true
// @allowJs: true
// @checkJs: true
// @Filename: mod.js
const util = exports = module.exports = {}
if (!!false) {
util.existy = function () { }
}
// @Filename: use.js
const util = require('./mod')
function n() {
util.existy // no error
}
util.existy // no error
| {
"end_byte": 289,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/typeFromPropertyAssignment37.ts"
} |
TypeScript/tests/cases/conformance/salsa/constructorNameInAccessor.ts_0_95 | // @target: esnext
class C1 {
get constructor() { return }
set constructor(value) {}
}
| {
"end_byte": 95,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/constructorNameInAccessor.ts"
} |
TypeScript/tests/cases/conformance/salsa/propertyAssignmentUseParentType2.ts_0_458 | // @allowJs: true
// @checkJs: true
// @noEmit: true
// @Filename: propertyAssignmentUseParentType2.js
/** @type {{ (): boolean; nuo: 789 }} */
export const inlined = () => true
inlined.nuo = 789
/** @type {{ (): boolean; nuo: 789 }} */
export const duplicated = () => true
/** @type {789} */
duplicated.nuo = 789
/**... | {
"end_byte": 458,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/propertyAssignmentUseParentType2.ts"
} |
TypeScript/tests/cases/conformance/salsa/inferringClassMembersFromAssignments.ts_0_3350 | // @outFile: output.js
// @allowJs: true
// @checkJs: true
// @noImplicitAny: true
// @strictNullChecks: true
// @filename: a.js
class C {
constructor() {
if (Math.random()) {
this.inConstructor = 0;
}
else {
this.inConstructor = "string"
}
this.inMul... | {
"end_byte": 3350,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/inferringClassMembersFromAssignments.ts"
} |
TypeScript/tests/cases/conformance/salsa/typeFromPropertyAssignment18.ts_0_201 | // @noEmit: true
// @allowJs: true
// @checkJs: true
// @Filename: a.js
var GLOBSTAR = m.GLOBSTAR = {}
function m() {
}
GLOBSTAR.p = 1
m.GLOBSTAR.q = 2
GLOBSTAR.p
GLOBSTAR.q
m.GLOBSTAR.p
m.GLOBSTAR.q
| {
"end_byte": 201,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/typeFromPropertyAssignment18.ts"
} |
TypeScript/tests/cases/conformance/salsa/moduleExportAlias.ts_0_1902 | // @allowJS: true
// @noEmit: true
// @filename: a.ts
import b = require("./b.js");
b.func1;
b.func2;
b.func3;
b.func4;
b.func5;
b.func6;
b.func7;
b.func8;
b.func9;
b.func10;
b.func11;
b.func12;
b.func13;
b.func14;
b.func15;
b.func16;
b.func17;
b.func18;
b.func19;
b.func20;
// @filename: b.js
var exportsAlias = expo... | {
"end_byte": 1902,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/moduleExportAlias.ts"
} |
TypeScript/tests/cases/conformance/salsa/enumMergeWithExpando.ts_0_277 | // @noEmit: true
// @allowJs: true
// @checkJs: true
// @Filename: lovefield-ts.d.ts
// bug #27352, crashes from github.com/google/lovefield
declare namespace lf {
export enum Order { ASC, DESC }
}
// @Filename: enums.js
lf.Order = {}
lf.Order.DESC = 0;
lf.Order.ASC = 1;
| {
"end_byte": 277,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/enumMergeWithExpando.ts"
} |
TypeScript/tests/cases/conformance/salsa/assignmentToVoidZero1.ts_0_208 | // @filename: assignmentToVoidZero1.js
// @declaration: true
// @module: commonjs
// @outdir: auss
// @checkJs: true
// @allowJs: true
// #38552
exports.y = exports.x = void 0;
exports.x = 1;
exports.y = 2;
| {
"end_byte": 208,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/assignmentToVoidZero1.ts"
} |
TypeScript/tests/cases/conformance/salsa/constructorFunctions2.ts_0_441 | // @allowJs: true
// @checkJs: true
// @noEmit: true
// @module: commonjs
// @filename: node.d.ts
declare function require(id: string): any;
declare var module: any, exports: any;
// @filename: index.js
const A = require("./other");
const a = new A().id;
const B = function() { this.id = 1; }
B.prototype.m = function(... | {
"end_byte": 441,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/constructorFunctions2.ts"
} |
TypeScript/tests/cases/conformance/salsa/plainJSRedeclare.ts_0_135 | // @outdir: out/
// @allowJS: true
// @filename: plainJSRedeclare.js
const orbitol = 1
var orbitol = 1 + false
orbitol.toExponential()
| {
"end_byte": 135,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/plainJSRedeclare.ts"
} |
TypeScript/tests/cases/conformance/salsa/inferringClassMembersFromAssignments8.ts_0_154 | // no inference in TS files, even for `this` aliases:
var app = function() {
var _this = this;
_this.swap = function() { }
}
var a = new app()
a
| {
"end_byte": 154,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/inferringClassMembersFromAssignments8.ts"
} |
TypeScript/tests/cases/conformance/salsa/annotatedThisPropertyInitializerDoesntNarrow.ts_0_373 | // @noEmit: true
// @allowJs: true
// @checkJs: true
// @Filename: Compilation.js
// from webpack/lib/Compilation.js and filed at #26427
/** @param {{ [s: string]: number }} map */
function mappy(map) {}
export class C {
constructor() {
/** @type {{ [assetName: string]: number}} */
this.assets = {}... | {
"end_byte": 373,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/annotatedThisPropertyInitializerDoesntNarrow.ts"
} |
TypeScript/tests/cases/conformance/salsa/exportPropertyAssignmentNameResolution.ts_0_116 | // @noEmit: true
// @allowJs: true
// @checkJs: true
// @Filename: bug24492.js
module.exports.D = class { }
new D()
| {
"end_byte": 116,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/exportPropertyAssignmentNameResolution.ts"
} |
TypeScript/tests/cases/conformance/salsa/defaultPropertyAssignedClassWithPrototype.ts_0_189 | // @noEmit: true
// @allowJs: true
// @checkJs: true
// @Filename: bug39167.js
var test = {};
test.K = test.K ||
function () {}
test.K.prototype = {
add() {}
};
new test.K().add;
| {
"end_byte": 189,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/defaultPropertyAssignedClassWithPrototype.ts"
} |
TypeScript/tests/cases/conformance/salsa/lateBoundAssignmentDeclarationSupport2.ts_0_437 | // @allowJs: true
// @checkJs: true
// @noEmit: true
// @strict: true
// @target: es6
// @filename: lateBoundAssignmentDeclarationSupport2.js
// currently unsupported
const _sym = Symbol();
const _str = "my-fake-sym";
module.exports[_sym] = "ok";
module.exports[_str] = "ok";
module.exports.S = _sym;
// @filename: usag... | {
"end_byte": 437,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/lateBoundAssignmentDeclarationSupport2.ts"
} |
TypeScript/tests/cases/conformance/salsa/propertiesOfGenericConstructorFunctions.ts_0_1054 | // @Filename: propertiesOfGenericConstructorFunctions.js
// @allowJs: true
// @checkJs: true
// @noEmit: true
/**
* @template {string} K
* @template V
* @param {string} ik
* @param {V} iv
*/
function Multimap(ik, iv) {
/** @type {{ [s: string]: V }} */
this._map = {};
// without type annotation
th... | {
"end_byte": 1054,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/propertiesOfGenericConstructorFunctions.ts"
} |
TypeScript/tests/cases/conformance/salsa/typeFromPropertyAssignment28.ts_0_453 | // @noEmit: true
// @allowJs: true
// @checkJs: true
// @Filename: a.js
// mixed prototype-assignment+class declaration
class C { constructor() { this.p = 1; } }
// Property assignment does nothing.
// You have to use Object.defineProperty(C, "prototype", { q: 2 })
// and that only works on classes with no superclass.
... | {
"end_byte": 453,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/typeFromPropertyAssignment28.ts"
} |
TypeScript/tests/cases/conformance/salsa/lateBoundClassMemberAssignmentJS3.ts_0_406 | // @allowJs: true
// @checkJs: true
// @emitDeclarationOnly: true
// @strict: true
// @target: es6
// @declaration: true
// @filename: lateBoundClassMemberAssignmentJS.js
const _sym = Symbol("_sym");
export class MyClass {
constructor() {
var self = this
self[_sym] = "ok";
}
method() {
... | {
"end_byte": 406,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/lateBoundClassMemberAssignmentJS3.ts"
} |
TypeScript/tests/cases/conformance/salsa/circularMultipleAssignmentDeclaration.ts_0_174 | // @filename:circularMultipleAssignmentDeclaration.js
// @allowJs: true
// @checkJs: true
// @noEmit: true
ns.next = ns.next || { shared: {} };
ns.next.shared.mymethod = {};
| {
"end_byte": 174,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/circularMultipleAssignmentDeclaration.ts"
} |
TypeScript/tests/cases/conformance/salsa/commonJSReexport.ts_0_322 | // #41422, based on prettier's exports
// @noEmit: true
// @checkJS: true
// @filename: first.js
const hardline = { type: "hard" }
module.exports = {
hardline
}
// @filename: second.js
module.exports = {
nested: require('./first')
};
// @filename: main.js
const { hardline } = require('./second').nested;
hardlin... | {
"end_byte": 322,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/commonJSReexport.ts"
} |
TypeScript/tests/cases/conformance/salsa/typeFromPrototypeAssignment4.ts_0_581 | // @allowJs: true
// @checkJs: true
// @emitDeclarationOnly: true
// @declaration: true
// @outDir: out
// @Filename: a.js
function Multimap4() {
this._map = {};
};
Multimap4["prototype"] = {
/**
* @param {string} key
* @returns {number} the value ok
*/
get(key) {
return this._map[key + ''];
}
};... | {
"end_byte": 581,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/typeFromPrototypeAssignment4.ts"
} |
TypeScript/tests/cases/conformance/salsa/thisPropertyAssignment.ts_0_706 | // @checkJs: true
// @allowJs: true
// @strict: true
// @emitDeclarationOnly: true
// @declaration: true
// @Filename: a.js
// This test is asserting that a single property/element access
// on `this` is a special assignment declaration, but chaining
// off that does not create additional declarations. I’m not sure
//... | {
"end_byte": 706,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/thisPropertyAssignment.ts"
} |
TypeScript/tests/cases/conformance/salsa/plainJSGrammarErrors.ts_0_4160 | // @outdir: out/
// @target: esnext
// @module: esnext
// @allowJs: true
// @filename: plainJSGrammarErrors.js
class C {
// #private mistakes
q = #unbound
m() {
#p
if (#po in this) {
}
}
#m() {
this.#m = () => {}
}
// await in static block
static {
... | {
"end_byte": 4160,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/plainJSGrammarErrors.ts"
} |
TypeScript/tests/cases/conformance/salsa/constructorNameInObjectLiteralAccessor.ts_0_98 | // @target: esnext
const c1 = {
get constructor() { return },
set constructor(value) {}
}
| {
"end_byte": 98,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/constructorNameInObjectLiteralAccessor.ts"
} |
TypeScript/tests/cases/conformance/salsa/requireOfESWithPropertyAccess.ts_0_218 | // @allowJs: true
// @checkJs: true
// @strict: true
// @outDir: out
// @declaration: true
// @filename: main.js
const x = require('./ch').x
x
x.grey
x.x.grey
// @filename: ch.js
const x = {
grey: {}
}
export { x }
| {
"end_byte": 218,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/requireOfESWithPropertyAccess.ts"
} |
TypeScript/tests/cases/conformance/salsa/commonJSAliasedExport.ts_0_368 | // @checkJs: true
// @outdir: out/
// @declaration: true
// @Filename: commonJSAliasedExport.js
const donkey = (ast) => ast;
function funky(declaration) {
return false;
}
module.exports = donkey;
module.exports.funky = funky;
// @Filename: bug43713.js
const { funky } = require('./commonJSAliasedExport');
/** @ty... | {
"end_byte": 368,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/commonJSAliasedExport.ts"
} |
TypeScript/tests/cases/conformance/salsa/typeFromPropertyAssignment9_1.ts_0_874 | // @noEmit: true
// @allowJs: true
// @checkJs: true
// @target: esnext
// @Filename: a.js
var my = my ?? {};
/** @param {number} n */
my.method = function(n) {
return n + 1;
}
my.number = 1;
my.object = {};
my.predicate = my.predicate ?? {};
my.predicate.query = function () {
var me = this;
me.property = ... | {
"end_byte": 874,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/typeFromPropertyAssignment9_1.ts"
} |
TypeScript/tests/cases/conformance/salsa/moduleExportDuplicateAlias2.ts_0_342 | // @checkJs: true
// @strict: true
// @declaration: true
// @outdir: out
// @filename: moduleExportAliasDuplicateAlias.js
module.exports.apply = undefined;
function a() { }
module.exports.apply = a;
module.exports.apply = a;
module.exports.apply()
// @filename: test.js
const { apply } = require('./moduleExportAliasDup... | {
"end_byte": 342,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/moduleExportDuplicateAlias2.ts"
} |
TypeScript/tests/cases/conformance/salsa/typeFromJSInitializer2.ts_0_287 | // @allowJs: true
// @checkJs: true
// @noEmit: true
// @strictNullChecks: true
// @noImplicitAny: true
// @Filename: a.js
/** @type {() => undefined} */
function f1() {
return undefined;
}
const a = f1()
/** @type {() => null} */
function f2() {
return null;
}
const b = f2()
| {
"end_byte": 287,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/typeFromJSInitializer2.ts"
} |
TypeScript/tests/cases/conformance/salsa/lateBoundAssignmentDeclarationSupport6.ts_0_663 | // @allowJs: true
// @checkJs: true
// @noEmit: true
// @strict: true
// @target: es6
// @filename: lateBoundAssignmentDeclarationSupport6.js
// currently unsupported
const _sym = Symbol();
const _str = "my-fake-sym";
function F() {
}
F.prototype.defsAClass = true;
Object.defineProperty(F.prototype, _str, {value: "ok"... | {
"end_byte": 663,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/lateBoundAssignmentDeclarationSupport6.ts"
} |
TypeScript/tests/cases/conformance/salsa/chainedPrototypeAssignment.ts_0_595 | // @noEmit: true
// @allowJs: true
// @checkJs: true
// @noImplicitAny: true
// @Filename: types.d.ts
declare function require(name: string): any;
declare var exports: any;
// @Filename: mod.js
/// <reference path='./types.d.ts'/>
var A = function A() {
this.a = 1
}
var B = function B() {
this.b = 2
}
exports.A... | {
"end_byte": 595,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/chainedPrototypeAssignment.ts"
} |
TypeScript/tests/cases/conformance/salsa/typeFromPropertyAssignment38.ts_0_130 | // @noEmit: true
// @strict: true
// @declaration: true
function F() {}
F["prop"] = 3;
const f = function () {};
f["prop"] = 3;
| {
"end_byte": 130,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/typeFromPropertyAssignment38.ts"
} |
TypeScript/tests/cases/conformance/salsa/jsContainerMergeTsDeclaration2.ts_0_171 | // @noEmit: true
// @allowJs: true
// @checkJs: true
// @Filename: a.d.ts
declare namespace C {
function bar(): void
}
// @Filename: b.js
C.prototype = {};
C.bar = 2;
| {
"end_byte": 171,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/salsa/jsContainerMergeTsDeclaration2.ts"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.