Skip to content

Commit

Permalink
chore(type-compiler): don't break on TS 5.2
Browse files Browse the repository at this point in the history
JSDocParsingMode is new in TS 5.3, which we try to use. This makes sure it's defined before it's used to not break TS < 5.3 users.
  • Loading branch information
marcj committed Feb 1, 2024
1 parent a7d2818 commit 6c3c057
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/type-compiler/src/resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ export class Resolver {
source,
{
languageVersion: this.compilerOptions.target || ScriptTarget.ES2018,
jsDocParsingMode: JSDocParsingMode.ParseNone,
// JSDocParsingMode is not available in TS < 5.3
jsDocParsingMode: JSDocParsingMode ? JSDocParsingMode.ParseNone : undefined,
},
true,
));
Expand Down

0 comments on commit 6c3c057

Please sign in to comment.