Source code
Revision control
Copy as Markdown
Other Tools
// This file was autogenerated by the `uniffi-bindgen-gecko-js` crate.
// Trust me, you don't want to mess with it!
import { UniFFITypeError } from "moz-src:///toolkit/components/uniffi-js/js/UniFFI.sys.mjs";
{%- for import in imports %}
{{ import }}
{%- endfor %}
// Objects intended to be used in the unit tests
export var UnitTestObjs = {};
{%- if has_callback_interface %}
{%- include "CallbackInterfaceRuntime.sys.mjs" %}
{% endif %}
{% include "Helpers.sys.mjs" %}
{%- for func in functions %}
{%- let callable=func.callable %}
{{ func.js_docstring }}
export {% if func.callable.is_js_async %}async {% endif %}function {{ func.name }}({%- filter indent(4) %}{% include "js/CallableArgs.sys.mjs" %}{% endfilter %}) {
{% include "js/CallableBody.sys.mjs" %}
}
{% endfor %}
{% include "Types.sys.mjs" %}
{%- if fixture %}
// Wrapper to skip type checking for function arguments
//
// This is only defined and used on test fixtures. The goal is to skip the JS type checking so that
// we can test the lower-level C++ type checking.
export class UniffiSkipJsTypeCheck {
constructor(value) {
this.value = value;
}
}
{%- endif %}