You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a new project, proj-a and add dependency to my-types@1.0.0
export a function from proj-a which uses the unsigned integer effect branded type in a function declaration
build and publish proj-a v1.0.0
Create a new project, proj-b and add a dependency on my-types@1.0.0 and proj-a@1.0.0
import the function from proj-a and call it in a new src file, supply the argument effect branded type from my-types
update effect to 3.0.5 in my-types
publish a new version of my-types v1.0.1
update proj-b's my-types dependency to v1.0.1
attempt to build and run proj-b
What is the expected behavior?
Expect that a branded type built with effect 3.0.5 can be supplied to a function declaration that expects a branded type argument build with effect 3.0.4
What do you see instead?
src/index.ts:4:16 - error TS2345: Argument of type 'import("/home/mmadson/dev/public/branded-types/projB/node_modules/@temp/ts-branded-types/dist/types/unsigned-integer", { with: { "resolution-mode": "import" } }).UnsignedInteger' is not assignable to parameter of type 'import("/home/mmadson/dev/public/branded-types/projB/node_modules/@temp/proj-a/node_modules/@temp/ts-branded-types/dist/types/unsigned-integer", { with: { "resolution-mode": "import" } }).UnsignedInteger'.
Property '[BrandTypeId]' is missing in type 'Number & Brand<"UnsignedInteger">' but required in type 'Brand<"UnsignedInteger">'.
4 myCoolFunction(UnsignedInteger(42));
Additional information
We use rennovate to control our dependency versions and version upgrades and wherever we use these effect branded types, we run into build compatibility issues.
The text was updated successfully, but these errors were encountered:
Brands (as well as a lot of other things in effect) work with unique symbol's, so if you have two versions of Effect they are going to be completely different.
So this is working as expected from my point of view.
What version of Effect is running?
3.0.5
What steps can reproduce the bug?
my-types
What is the expected behavior?
Expect that a branded type built with effect 3.0.5 can be supplied to a function declaration that expects a branded type argument build with effect 3.0.4
What do you see instead?
Additional information
We use rennovate to control our dependency versions and version upgrades and wherever we use these effect branded types, we run into build compatibility issues.
The text was updated successfully, but these errors were encountered: