sourceTextModule.instantiate()
- 返回:<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.】