• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

TypeScript lodash.assignIn函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: constructor

 constructor(user?:{lastConnection:string,username:string,password:string,role:Profile}) {
     this.rememberMe = false;
     this.roles = [];
     if(user) {
         _.assignIn(this, user);
     }
 }
开发者ID:lzielinski03,项目名称:ionicbesy,代码行数:7,代码来源:user.ts


示例2: return

 return ((params: busboyPipe.FilePipeParams) : busboyPipe.WriteStreamInfo => {
     let s3Params: any = {
         "Bucket": options.Bucket,
         "Key": options.KeyMaker(params)
     };
     if (options.additonalS3Options) s3Params = _.assignIn(s3Params, options.additonalS3Options);
     let upload: stream.Writable = s3Stream.upload(s3Params);
     upload.on('uploaded', (details:any) => {
         upload.emit('close');
     });
     return {stream: upload, streamInfo: s3Params};
 });
开发者ID:wchang28,项目名称:request_test,代码行数:12,代码来源:s3_upload_stream_factory.ts


示例3: function

    $scope.$on('onTimeframeChange', function (event, timeframe) {
      let query;

      if (that.widget.chart.request.query) {
        query = that.widget.chart.request.query;
      }

      // Associate the new timeframe to the chart request
      _.assignIn(that.widget.chart.request, {
        interval: timeframe.interval,
        from: timeframe.from,
        to: timeframe.to,
        query: query,
        additionalQuery: that.widget.chart.request.additionalQuery
      });

      that.reload();
    });
开发者ID:gravitee-io,项目名称:gravitee-management-webui,代码行数:18,代码来源:widget.component.ts


示例4: setTimeout

 // api's $M method
 $M(pathname: string, options?: IMessageClientOptions, headers?: $dr.HTTPHeaders) : mc.IMessageClient {
     options = options || defaultMsgClientOptions;
     options = _.assignIn({}, defaultMsgClientOptions, options);
     let eventApiRoute = this.mount(pathname);
     let client = new mc.MessageClient(eventApiRoute.$J.bind(eventApiRoute));
     let retryConnect = () => {
         this.$E(pathname, headers)
         .then((ret: $dr.I$EReturn) => {
             client.attachEventSource(ret);
         }).catch((err: any) => {
             client.emit('error', err);
         });
     };
     client.on('error', (err:any) => {
         setTimeout(retryConnect, options.reconnetIntervalMS);
     });
     retryConnect();
     return client;
 }
开发者ID:wchang28,项目名称:rcf,代码行数:20,代码来源:index.ts


示例5: getAccessFromCode

 getAccessFromCode(client_id:string, params: auth_client.IGetAccessFromCodeParams, done:(err:any, access: oauth2.Access) => void) : void {
     let data = this.extendParams(client_id, params);
     let ret = generateBearerAccessTokens(true);
     data = _.assignIn(data, ret);
     this.execute('[dbo].[stp_AuthGetAccessFromCode]', data, (err:any, recordsets:any[]) => {
         if (err)
             done(err, null);
         else {
             let err:IError = recordsets[0][0];
             if (err.error)
                 done(err, null);
             else {
                 let access: oauth2.Access = recordsets[1][0];
                 //console.log(JSON.stringify(access));
                 done(null, access);
             }
         }
     });
 }
开发者ID:wchang28,项目名称:polaris-auth-serv,代码行数:19,代码来源:authDB.ts


示例6: it

 it('should prepare data if RGW', () => {
   const newData = _.assignIn(component.selection.first(), {
     fsal: {
       name: 'RGW',
       rgw_user_id: 'rgw_user_id'
     }
   });
   component.selection.selected = [newData];
   component.selection.update();
   component.ngOnChanges();
   expect(component.data).toEqual({
     'Access Type': 'RW',
     Cluster: 'cluster1',
     Daemons: ['node1', 'node2'],
     'NFS Protocol': ['NFSv3', 'NFSv4'],
     'Object Gateway User': 'rgw_user_id',
     Path: '/qwe',
     Pseudo: '/qwe',
     Squash: 'no_root_squash',
     'Storage Backend': 'Object Gateway',
     Transport: ['TCP', 'UDP']
   });
 });
开发者ID:,项目名称:,代码行数:23,代码来源:


示例7: getHeaders

 // returns the headers to be used for the API call
 public getHeaders(additionalHeaders?: {[field:string]:string}) : any {
     let headers = additionalHeaders || {};
     let authHeader = oauth2.Utils.getAuthorizationHeaderFormAccessToken(this.access);
     if (authHeader) _.assignIn(headers, {'Authorization' : authHeader});
     return (JSON.stringify(headers) === '{}' ? null : headers);
 }
开发者ID:wchang28,项目名称:rcf,代码行数:7,代码来源:index.ts


示例8: extendParams

 private extendParams(client_id:string, params:any) : any {  // added client_id to the params
     return _.assignIn({client_id}, params);
 }
开发者ID:wchang28,项目名称:polaris-auth-serv,代码行数:3,代码来源:authDB.ts


示例9: constructor

 constructor(token:{secretKey:string,token:string,securityLevel:string}) {
     _.assignIn(this, token);
 }
开发者ID:fensminger,项目名称:SyncFiles,代码行数:3,代码来源:securityToken.ts



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
TypeScript lodash.attempt函数代码示例发布时间:2022-05-25
下一篇:
TypeScript lodash.assign函数代码示例发布时间:2022-05-25
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap