diff options
Diffstat (limited to 'toolkit/components/uniffi-bindgen-gecko-js/src/templates/js/Float64.sys.mjs')
-rw-r--r-- | toolkit/components/uniffi-bindgen-gecko-js/src/templates/js/Float64.sys.mjs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/toolkit/components/uniffi-bindgen-gecko-js/src/templates/js/Float64.sys.mjs b/toolkit/components/uniffi-bindgen-gecko-js/src/templates/js/Float64.sys.mjs new file mode 100644 index 0000000000..fc49046691 --- /dev/null +++ b/toolkit/components/uniffi-bindgen-gecko-js/src/templates/js/Float64.sys.mjs @@ -0,0 +1,18 @@ +// Export the FFIConverter object to make external types work. +export class {{ ffi_converter }} extends FfiConverter { + static computeSize() { + return 8; + } + static lift(value) { + return value; + } + static lower(value) { + return value; + } + static write(dataStream, value) { + dataStream.writeFloat64(value) + } + static read(dataStream) { + return dataStream.readFloat64() + } +} |