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


TypeScript lodash.assignIn函数代码示例

本文整理汇总了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;未经允许,请勿转载。