Skip to content

Commit 8241a46

Browse files
committed
fix: normalize invalidated file path
1 parent f949f59 commit 8241a46

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/tsc/context.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import path from 'node:path'
12
import Debug from 'debug'
23
import type ts from 'typescript'
34

@@ -29,6 +30,7 @@ export function createContext(): TscContext {
2930
}
3031

3132
export function invalidateContextFile(context: TscContext, file: string): void {
33+
file = path.resolve(file).replaceAll('\\', '/')
3234
debug(`invalidating context file: ${file}`)
3335
context.files.delete(file)
3436
context.programs = context.programs.filter((program) => {

0 commit comments

Comments
 (0)