Skip to content

Commit

Permalink
fix(type-compiler): also parse tsx source files
Browse files Browse the repository at this point in the history
fixes #560
  • Loading branch information
marcj committed Mar 17, 2024
1 parent 2518670 commit 80464bf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/type-compiler/src/resolver.ts
Expand Up @@ -80,8 +80,10 @@ export class Resolver {
const result = this.resolveImpl(modulePath, sourceFile);
if (!result) return;

// only .ts and .d.ts files are supported
if (!result.resolvedFileName.endsWith('.ts') && !result.resolvedFileName.endsWith('.d.ts')) {
// only .ts, .tsx and .d.ts files are supported
if (!result.resolvedFileName.endsWith('.ts')
&& !result.resolvedFileName.endsWith('.tsx')
&& !result.resolvedFileName.endsWith('.d.ts')) {
return;
}

Expand Down

0 comments on commit 80464bf

Please sign in to comment.