#How to create "export default" @external?

1 messages · Page 1 of 1 (latest)

floral plank
#

Currently external requires us to specify the name of function. How to specify function exported with default?

export default function now() {
    // ...
}
@external(javascript, "./my_package_ffi.mjs", "default") // Is this correct?
pub fn now() -> DateTime
errant venture
#

yup that's right

floral plank
#

Ah okay thanks!