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


TypeScript lodash.merge类代码示例

本文整理汇总了TypeScript中lodash.merge的典型用法代码示例。如果您正苦于以下问题:TypeScript merge类的具体用法?TypeScript merge怎么用?TypeScript merge使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了merge类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: setConfig

  public setConfig(taskConfig: TASK_CONFIG): void {
    /* tslint:disable:typedef */
    let merge = require('lodash.merge');
    /* tslint:enable:typedef */

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

示例2: it

    it("will reject expired incoming messages", function (done) {

      const confirmMethod = simple.mock(AMQPSubscriberAdapter.prototype,
        "confirmProcessedMessage");

      const rejectMethod = simple.mock(AMQPSubscriberAdapter.prototype,
        "rejectMessage");

      const onMessageMethod = simple.mock();

      consumer.on("message", onMessageMethod);

      const expiredMessage = merge({}, fixtures.consumer_basic, {
        meta: {ttl: 10000},
      });

      publisher.publish([
        fixtures.consumer_basic,
        expiredMessage,
        fixtures.consumer_basic,
      ], function (err) {
        if (err) return done(err);

        setTimeout(function () {
          expect(onMessageMethod.callCount).equals(2);
          expect(onMessageMethod.calls[0].arg).deep.equals(fixtures.consumer_basic);
          expect(onMessageMethod.calls[1].arg).deep.equals(fixtures.consumer_basic);
          expect(rejectMethod.callCount).equals(1);
          expect(confirmMethod.callCount).equals(2);
          expect(rejectMethod.lastCall.k).above(confirmMethod.calls[0].k);
          expect(rejectMethod.lastCall.k).below(confirmMethod.calls[1].k);
          done();
        }, 100);
      });
    });
开发者ID:tcdl,项目名称:msb,代码行数:35,代码来源:amqp.ts

示例3: updateValidatorsOnDiscriminatorChange

    public updateValidatorsOnDiscriminatorChange(discriminatorValue: any, swaggerDef, fullSwaggerDef) {
        var allOf = fullSwaggerDef.api.definitions[discriminatorValue].allOf;
        this._validators = {};

        var newSwaggerDef = _.merge.apply(this, [{}].concat(allOf));

        attachStaticValidators(this, newSwaggerDef);
    }
开发者ID:dotDeeka,项目名称:ts-validator,代码行数:8,代码来源:base-model.ts

示例4: createComponent

 public createComponent (createOptions?: any): void {
   let options = {
     template: this.template,
     components: this.components
   }
   if (createOptions) merge(options, createOptions)
   this.vm = new Vue(options).$mount()
 }
开发者ID:Timshel,项目名称:treeTag,代码行数:8,代码来源:component-test.ts

示例5: function

  channelManager.createRawConsumer = function (topic, options) {
    let a = getAdapter();

    let subscriberConfig = merge({
      channel: helpers.validatedTopic(topic),
    }, adapterConfig, options);

    return a.Subscribe(subscriberConfig);
  };
开发者ID:tcdl,项目名称:msb,代码行数:9,代码来源:channelManager.ts

示例6: constructor

 constructor(authToken: string | undefined = undefined, requireAuth: boolean = false, options: GitHubAPI.Options = {}) {
   this.options = merge(
     options,
     { headers: { 'user-agent': 'Electron Forge' } },
   );
   if (authToken) {
     this.token = authToken;
   } else if (process.env.GITHUB_TOKEN) {
     this.token = process.env.GITHUB_TOKEN;
   } else if (requireAuth) {
     throw 'Please set GITHUB_TOKEN in your environment to access these features';
   }
 }
开发者ID:balloonzzq,项目名称:electron-forge,代码行数:13,代码来源:github.ts

示例7: setConfig

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

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

示例8: merge

export function merge(...args: any[]): DefineAttributes {
    return lmerge.apply(null, args.reverse());
}
开发者ID:consumr-project,项目名称:cp,代码行数:3,代码来源:utils.ts


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