本文整理汇总了TypeScript中lodash.merge.default方法的典型用法代码示例。如果您正苦于以下问题:TypeScript merge.default方法的具体用法?TypeScript merge.default怎么用?TypeScript merge.default使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lodash.merge
的用法示例。
在下文中一共展示了merge.default方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: merge
export * from "./resolvers";
export * from "./defaults";
export * from "./types";
import merge from "lodash.merge";
import * as songs from "./songs";
const merged = merge(songs);
export const resolvers = merged.resolvers;
export const defaults = merged.defaults;
示例2: it
it("will not reject incoming messages that fail onEvent validation", function (done) {
const confirmMethod = simple.mock(AMQPSubscriberAdapter.prototype,
"confirmProcessedMessage");
const rejectMethod = simple.mock(AMQPSubscriberAdapter.prototype,
"rejectMessage");
const onMessageMethod = simple.mock().callFn(function (message) {
consumer.confirmProcessedMessage(message);
});
const validationMethod = validateWithSchema.onEvent(fixtures.consumer_schema, onMessageMethod);
consumer.on("message", validationMethod);
const validMessage = merge({}, fixtures.consumer_basic, {
payload: {
body: {},
},
});
publisher.publish([
validMessage,
fixtures.consumer_basic,
validMessage,
], function (err) {
if (err) return done(err);
setTimeout(function () {
expect(onMessageMethod.callCount).equals(1);
expect(onMessageMethod.calls[0].arg).deep.equals(validMessage);
expect(rejectMethod.callCount).equals(0);
expect(confirmMethod.callCount).equals(1);
done();
}, 100);
});
});
示例3: function
channelManager.createRawProducer = function (topic, options) {
const adap = getAdapter();
let producerConfig = merge(adapterConfig, options);
return adap.Publish(producerConfig).channel(helpers.validatedTopic(topic));
};
示例4: setConfig
export function setConfig(config: IBuildConfig) {
let merge = require('lodash.merge');
_buildConfig = merge({}, _buildConfig, config);
}
示例5: setConfig
public setConfig(taskConfig: TASK_CONFIG) {
let merge = require('lodash.merge');
this.taskConfig = merge({}, this.taskConfig, taskConfig);
}