我一直在使用Typescript开发一个应用程序,该程序被编译成节点代码。因此,我更喜欢使用 import require .
import
require
我一直试图将Lodash与Lodash Deep一起使用,他们的官方文件说明使用方法应为: const _ = require("deepdash")(require("lodash"));
const _ = require("deepdash")(require("lodash"));
是否有人知道如何做到这一点,或者可以向我指出相关的资源,以便我的代码保持一致。
进口的 deepdash 是一个函数,需要使用lodash对象作为参数调用它。
deepdash
import lodash from "lodash" import deepdash from "deepdash" const _ = deepdash(lodash)