Can be called to provide a predictable point where no more JS interfaces can be added. Creating an instance of JsObject will also automatically trigger all JsObjects to be finalized.
Source
/**
* Can be called to provide a predictable point where no more JS interfaces can
* be added. Creating an instance of JsObject will also automatically trigger
* all JsObjects to be finalized.
*/
void finalizeJsInterfaces() {
if (_finalized == true) {
throw 'JSInterop class registration already finalized';
}
_finalizeJsInterfaces();
}