Skip to content

Merge editor: TypeScript type errors do not appear #206672

Open

Description

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.87.0
  • OS Version: macOS 14.2.1 (23C71)

Steps to Reproduce:

Install TypeScript and create main.ts with contents:

export const add1 = (n: number) => n + 1;

add1(2)

Copy and apply the following patch e.g. using pbpaste | git apply -3. This will result in a conflict.

diff --git a/main.ts b/main.ts
index 4885bfc..bfd86b9 100644
--- a/main.ts
+++ b/main.ts
@@ -1,3 +1,4 @@
 export const add1 = (n: number) => n + 1;
 
+// foo
 add1(1)

Open the conflict in VS Code's merge editor.

Resolve the conflict but purposefully create a type error.

Expected: the type error should appear.

Actual: the type error does not appear. The type error only appears if I open the file outside of the merge editor.

Screen.Recording.2024-03-02.at.10.19.30.2.mov

Activity

  1. vscodenpa commented on Mar 2, 2024

    @vscodenpa

    Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.87.0. Please try upgrading to the latest version and checking whether this issue remains.

    Happy Coding!

  2. hediet commented on Mar 4, 2024

    @hediet
    Member

    Matt Bierner (@mjbvz) it seems like diagnostics only update when the text document is opened in another editor:

    Image

  3. added
    bug
    typescript
    on Mar 4, 2024
  4. added this to the Backlog milestone on Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugmerge-editortypescript

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions