-
Notifications
You must be signed in to change notification settings - Fork 44
Mixing conversions and submodule's isn't using the conversion #414
Comments
@tomgasson thanks for the report. Spot on. |
@tomgasson do you actually need it, or is it just an issue you noticed? We're moving towards zero conversion once the runtime representation of variants changes. I'm tempted to just not generate the internal module when conversion is required. const X: { foo: (t) => void, ... } = GenTypeBugBS.X;
exports.X = X |
Yeah, this is a real bug we hit. If we're already on a path to not need this that's great. If it's easy, not generating the X.foo type will make it hard to fall for this trap |
@tomgasson see fix in #416 where inner modules are not emitted when they require conversion. |
Looks good. Thanks for the fix |
Gives
A call to
Module.X.foo("A")
won't use X_foo, it will use the BS.X.foo method directlyThe text was updated successfully, but these errors were encountered: