1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
//// [tests/cases/compiler/declarationMapsOutFile2.ts] ////
//// [a.ts]
class Foo {
doThing(x: {a: number}) {
return {b: x.a};
}
static make() {
return new Foo();
}
}
//// [index.ts]
const c = new Foo();
c.doThing({a: 42});
let x = c.doThing({a: 12});
//// [bundle.js]
var Foo = /** @class */ (function () {
function Foo() {
}
Foo.prototype.doThing = function (x) {
return { b: x.a };
};
Foo.make = function () {
return new Foo();
};
return Foo;
}());
var c = new Foo();
c.doThing({ a: 42 });
var x = c.doThing({ a: 12 });
//// [bundle.d.ts]
declare class Foo {
doThing(x: {
a: number;
}): {
b: number;
};
static make(): Foo;
}
declare const c: Foo;
declare let x: {
b: number;
};
//# sourceMappingURL=bundle.d.ts.map
|