Skip to content

Commit f1bfef5

Browse files
authored
chore: add comment (#37)
1 parent 8e1fa48 commit f1bfef5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/ts.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ export class TSService {
152152
this.currTarget.filePath === normalizeFileName(fileName) &&
153153
isExtra(fileName, extraFileExtensions)
154154
) {
155+
// Parse the target file as TSX.
155156
return (this.currTarget.sourceFile ??= ts.createSourceFile(
156157
this.currTarget.filePath,
157158
this.currTarget.code,
@@ -170,6 +171,7 @@ export class TSService {
170171
};
171172
/* eslint-enable @typescript-eslint/unbound-method -- ignore */
172173
host.getSourceFile = (fileName, languageVersionOrOptions, ...args) => {
174+
// Always call the original function, because it calls the file watcher.
173175
const originalSourceFile = original.getSourceFile.call(
174176
host,
175177
fileName,
@@ -187,6 +189,7 @@ export class TSService {
187189
languageVersionOrOptions,
188190
...args
189191
) => {
192+
// Always call the original function, because it calls the file watcher.
190193
const originalSourceFile = original.getSourceFileByPath.call(
191194
host,
192195
fileName,

0 commit comments

Comments
 (0)