@@ -2454,9 +2454,19 @@ generators to insert the function into the nested scope of a class, abstract
24542454data type, object, namespace, package, module or whatever resources get bound
24552455to. For example, a function named ` [method]C.foo ` could be bound in C++ to a
24562456member function ` foo ` in a class ` C ` . The JS API [ below] ( #JS-API ) describes how
2457- the native JavaScript bindings could look. Validation described in
2458- [ Binary.md] ( Binary.md ) inspects the contents of ` plainname ` and ensures that
2459- the function has a compatible signature.
2457+ the native JavaScript bindings could look.
2458+
2459+ To restrict the set of cases that bindings generators need to consider, these
2460+ annotations trigger additional type-validation rules (listed in
2461+ [ Binary.md] ( Binary.md ) ) such as:
2462+ * An import or export named ` [static]R.foo ` must be a function and ` R ` must
2463+ be the name of an imported or exported resource type in the same ` instance `
2464+ or ` component ` type.
2465+ * Similarly, an import or export named ` [constructor]R ` must be a function
2466+ whose return type must be ` (own $R) ` or ` (result (own $R) (error <valtype>)?) `
2467+ where ` $R ` is the type-index of the resource type named ` R ` .
2468+ * Similarly, an import or export named ` [method]R.foo ` must be a function whose
2469+ first parameter must be ` (param "self" (borrow $R)) ` .
24602470
24612471When a function is annotated with ` async ` , bindings generators are expected to
24622472emit whatever asynchronous language construct is appropriate (such as an
0 commit comments