The second part to fix #68 is a little more involved, but is not yet worth it:
for imported types and their converters, the bindings should use a more fully qualified name. e.g.
Instead of:
import { Crate1 } from "./crate1";
import crate1 from "./crate1";
const { FfiConverterTypeCrate1 } = crate1.converters;
// In use
type MyType = {
scalar: Crate1,
optional: Crate1 | undefined,
list: Array<Crate1>,
}
// FfiConverterTypeCrate1 being used.
const lift = FfiConverterTypeCrate1.lift.bind(FfiConverterTypeCrate1);
The next part needs to generate code:
import * as crate1 from "./crate1";
// In use
type MyType = {
scalar: crate1.Crate1,
optional: crate1.Crate1 | undefined,
list: Array<crate1.Crate1>,
}
// FfiConverterTypeCrate1 being used.
const lift = crate1.converters.FfiConverterTypeCrate1.lift.bind(crate1.converters.FfiConverterTypeCrate1);
I think I will file a new issue with this in, and close #68.
According to The Big O of Code Reviews, this is a O(n) change.
This PR partially fixes #68:
The second part to fix #68 is a little more involved, but is not yet worth it:
Instead of:
The next part needs to generate code:
I think I will file a new issue with this in, and close #68.