π Search Terms
incremental
const enum
π Version & Regression Information
4.9.5
β― Playground Link
No response
π» Code
step1, assume we have the following code
a.ts
import {A} from "./c"
let a = A.ONE
b.d.ts
export const enum A {
ONE = 1
}
c.ts
import {A} from "./b"
let b = A.ONE
export {A}
cmdline
tsc --incremental a.ts --tsBuildInfoFile ./buildFile
output
a.js
"use strict";
exports.__esModule = true;
var a = 1 /* A.ONE */;
c.js
"use strict";
exports.__esModule = true;
var b = 1 /* A.ONE */;
step2, then modify b.d.ts
export const enum A {
ONE = 2
}
run cmdline
tsc --incremental a.ts --tsBuildInfoFile ./buildFile
step3, modify b.d.ts again
export const enum A {
ONE = 3
}
run cmdline
tsc --incremental a.ts --tsBuildInfoFile ./buildFile
the output is not correct
output:
a.js
"use strict";
exports.__esModule = true;
var a = 2 /* A.ONE */;
c.js
"use strict";
exports.__esModule = true;
var b = 3 /* A.ONE */
π Actual behavior
output of step3
a.js
"use strict";
exports.__esModule = true;
var a = 2 /* A.ONE */;
c.js
"use strict";
exports.__esModule = true;
var b = 3 /* A.ONE */
π Expected behavior
output of step3
a.js
"use strict";
exports.__esModule = true;
var a = 3 /* A.ONE */;
c.js
"use strict";
exports.__esModule = true;
var b = 3 /* A.ONE */
Additional information about the issue
No response
π Search Terms
incremental
const enum
π Version & Regression Information
4.9.5
β― Playground Link
No response
π» Code
step1, assume we have the following code
a.ts
b.d.ts
c.ts
cmdline
output
a.js
c.js
step2, then modify b.d.ts
run cmdline
step3, modify b.d.ts again
run cmdline
the output is not correct
output:
a.js
c.js
π Actual behavior
output of step3
a.js
c.js
π Expected behavior
output of step3
a.js
c.js
Additional information about the issue
No response