sourceTextModule.instantiate()
-
返回:<undefined>
¥Returns: <undefined>
使用链接的请求模块实例化模块。
¥Instantiate the module with the linked requested modules.
此方法解析模块的导入绑定,包括重新导出的绑定名称。当存在任何无法解析的绑定时,将同步抛出错误。
¥This resolves the imported bindings of the module, including re-exported binding names. When there are any bindings that cannot be resolved, an error would be thrown synchronously.
如果请求的模块包含循环依赖,则必须在循环中的所有模块上调用 sourceTextModule.linkRequests(modules)
方法,然后再调用此方法。
¥If the requested modules include cyclic dependencies, the
sourceTextModule.linkRequests(modules)
method must be called on all
modules in the cycle before calling this method.