Skip to content

Commit

Permalink
fix: throw if enabled composite / incremental for vue-tsc
Browse files Browse the repository at this point in the history
close #2622
  • Loading branch information
johnsoncodehk committed Apr 20, 2023
1 parent 3e87bed commit 32b8dd7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/vue-tsc/src/index.ts
Expand Up @@ -22,6 +22,9 @@ export function createProgram(options: ts.CreateProgramOptions) {
if (!options.options.noEmit && options.options.noEmitOnError)
throw toThrow('noEmitOnError is not supported');

if (options.options.composite || options.options.incremental)
throw toThrow('composite / incremental is not supported');

if (options.options.extendedDiagnostics || options.options.generateTrace)
throw toThrow('--extendedDiagnostics / --generateTrace is not supported, please run `Write Virtual Files` in VSCode to write virtual files and use `--extendedDiagnostics` / `--generateTrace` via tsc instead of vue-tsc to debug.');

Expand Down

4 comments on commit 32b8dd7

@SamHoque
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this added? and how are we suppose to use composite with vue-tsc?

@johnsoncodehk
Copy link
Member Author

@johnsoncodehk johnsoncodehk commented on 32b8dd7 Apr 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It causes a problem: #2622. You can use vue-tsc with --composite false.

@blake-newman
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@johnsoncodehk that issue is not really affecting anything. It only appears when there is a TS error, and it doesn't affect anything other than displaying another error message after run.

Doesn't actually cause vue-tsc to break.

@johnsoncodehk
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@blake-newman I can see that, it reverts in b596a60.

Please sign in to comment.