Skip to content

Commit 4c8092d

Browse files
committed
fix(typescript): replace runtime undefined with void 0 in new code\n\n- watchProgram: use void 0 when resetting cached transformers in watch mode\n- tests: use void 0 in new watch-mode transformer test to satisfy no-undefined\n\nRefs PR #1923 review feedback from @shellscape
1 parent c6cb4f6 commit 4c8092d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/typescript/src/watchProgram.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ function createWatchHost(
165165
// Ensure we recompute custom transformers for each new builder program in watch mode
166166
// so factories capture the current Program/TypeChecker and any provided getters return
167167
// the latest values. This avoids freezing the initial Program across rebuilds.
168-
createdTransformers = undefined;
168+
createdTransformers = void 0;
169169
const origEmit = program.emit;
170170
// eslint-disable-next-line no-param-reassign
171171
program.emit = (

packages/typescript/test/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1747,7 +1747,7 @@ test.serial(
17471747
factory(program, getProgram) {
17481748
observations.push({
17491749
p: program && program.id,
1750-
gp: getProgram ? getProgram().id : undefined
1750+
gp: getProgram ? getProgram().id : void 0
17511751
});
17521752
// no-op transformer
17531753
return function passthroughFactory(context) {

0 commit comments

Comments
 (0)