-
Notifications
You must be signed in to change notification settings - Fork 44
exportInterfaces:true
doesn't work with labeled arguments
#561
Comments
Indeed, thanks for reporting. |
Yeah I know it's kind of experimental and we started using it recently but I think it's very convenient for one use-case. Let's say you have to deal with a very complex type from typescript but only use a subset of it from rescript, what we do is that we define this subset in rescript as an interface with genType then import it from typescript and extend this interface to add the fields we only use in typescript. I could otherwise define the type entirely in rescript and import the types from typescript as opaque types for the fields I don't use in rescript, but it's a bit cumbersome and easily leads to circular dependencies. |
Maybe it makes sense to activate it on specific values/files, and move it off being an experimental option. |
Thanks a lot @cristianoc.
|
OK I have cloned it and built it and it indeed solves the issue, thanks @cristianoc :) |
if you have
"exportInterfaces": true
in yourbsconfig.json
and have this insideFoo.res
:This is generated in
Foo.gen.ts
:As you can see, the type
bar
doesn't exist and should beIbar
.The text was updated successfully, but these errors were encountered: