Skip to content

Commit

Permalink
fix omit intersection
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasavila00 committed Dec 14, 2024
1 parent 92189f7 commit e43d652
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"parser": "./src/parser.ts",
"outputDir": "./src/generated"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
generated/
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import parse from "./generated/parser";
type A = { a: string };
type A2 = { a: number; b: number };
type IX3 = A & A2;

parse.buildParsers<{ IX3: Omit<IX3, "a"> }>();
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Error: Object has conflicting key value in intersection
/errors/conflict-object-kvs/src/parser.ts:6:27
4 | type IX3 = A & A2;
5 |
> 6 | parse.buildParsers<{ IX3: Omit<IX3, "a"> }>();
| ^^^^ Object has conflicting key value in intersection
7 |

Found 1 error
Empty file.

0 comments on commit e43d652

Please sign in to comment.