* Hoist initial assignment to exported names in cjs to they are not blocked by bindings made by __exportStar * Copy hoisted identifiers so they do not create sourcemaps * Accept updated baselines
26 lines
708 B
TypeScript
26 lines
708 B
TypeScript
//// [declarationEmitConstantNoWidening.ts]
|
|
export const FOO = 'FOO';
|
|
export class Bar {
|
|
readonly type = FOO; // Should be widening literal "FOO" - so either `typeof "FOO"` or = "FOO"
|
|
}
|
|
|
|
//// [declarationEmitConstantNoWidening.js]
|
|
"use strict";
|
|
exports.__esModule = true;
|
|
exports.Bar = exports.FOO = void 0;
|
|
exports.FOO = 'FOO';
|
|
var Bar = /** @class */ (function () {
|
|
function Bar() {
|
|
this.type = exports.FOO; // Should be widening literal "FOO" - so either `typeof "FOO"` or = "FOO"
|
|
}
|
|
return Bar;
|
|
}());
|
|
exports.Bar = Bar;
|
|
|
|
|
|
//// [declarationEmitConstantNoWidening.d.ts]
|
|
export declare const FOO = "FOO";
|
|
export declare class Bar {
|
|
readonly type = "FOO";
|
|
}
|