当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript merge.default方法代码示例

本文整理汇总了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;
开发者ID:koodinikkarit,项目名称:joona,代码行数:12,代码来源:index.ts

示例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);
      });
    });
开发者ID:tcdl,项目名称:msb,代码行数:38,代码来源:amqp.ts

示例3: function

  channelManager.createRawProducer = function (topic, options) {
    const adap = getAdapter();
    let producerConfig = merge(adapterConfig, options);

    return adap.Publish(producerConfig).channel(helpers.validatedTopic(topic));
  };
开发者ID:tcdl,项目名称:msb,代码行数:6,代码来源:channelManager.ts

示例4: setConfig

export function setConfig(config: IBuildConfig) {
  let merge = require('lodash.merge');

  _buildConfig = merge({}, _buildConfig, config);
}
开发者ID:nickpape-msft,项目名称:gulp-core-build,代码行数:5,代码来源:index.ts

示例5: setConfig

  public setConfig(taskConfig: TASK_CONFIG) {
    let merge = require('lodash.merge');

    this.taskConfig = merge({}, this.taskConfig, taskConfig);
  }
开发者ID:nickpape-msft,项目名称:gulp-core-build,代码行数:5,代码来源:GulpTask.ts


注:本文中的lodash.merge.default方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。