hey, I’m not sure what’s your issue here, you could use @as and externals to bind to functions with starting with an uppercase and bind to multiple languages at the same time:
type givenUtils = {
@as("When") when_: 'a. (string, 'a) => unit,
@as("Then") then: 'a. (string, 'a) => unit,
@as("And") and_: 'a. (string, 'a) => unit,
@as("Quand") quand: 'a. (string, 'a) => unit,
}
@module("vitest-bdd")
external given: (string, (givenUtils, 'args) => unit) => unit = "Given"
If it compiles to correct js files, I guess you could parse the generated js files, couldn’t you?