Trouble re-using existing branded type in TypeScript

I am having trouble re-using an existing branded type (https://github.com/Effect-TS/schema#reusing-an-existing-branded-type). Was there any recent subtle change and/or am I doing something wrong?
type ToolId = string & B.Brand<"toolId">
export const ToolId = B.nominal<ToolId>()

const Id = S.fromBrand(ToolId)(S.string)

Yields the following errors:
Argument of type 'Constructor<ToolId>' is not assignable to parameter of type 'Constructor<Brand<string | symbol>>'.
  Property '[RefinedConstructorsTypeId]' is missing in type 'Constructor<ToolId>' but required in type 'Constructor<Brand<string | symbol>>'.ts(2345)
Brand.d.ts(80, 18): '[RefinedConstructorsTypeId]' is declared here.

and
Argument of type 'Schema<string, string>' is not assignable to parameter of type 'Schema<string, Brand<string | symbol>>'.
  Types of property 'To' are incompatible.
    Type '(_: string) => string' is not assignable to type '(_: Brand<string | symbol>) => Brand<string | symbol>'.
      Types of parameters '_' and '_' are incompatible.
        Type 'Brand<string | symbol>' is not assignable to type 'string'.ts(2345)


I'm using latest packages:
    "@effect/data": "^0.12.5",
    "@effect/io": "^0.26.0",
    "@effect/schema": "^0.20.0",
Was this page helpful?