-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
Fix AvailableA PR has been opened for this issueA PR has been opened for this issueNeeds InvestigationThis issue needs a team member to investigate its status.This issue needs a team member to investigate its status.
Milestone
Description
π 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
Metadata
Metadata
Assignees
Labels
Fix AvailableA PR has been opened for this issueA PR has been opened for this issueNeeds InvestigationThis issue needs a team member to investigate its status.This issue needs a team member to investigate its status.