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


TypeScript ember-utils.guidFor函数代码示例

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


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

示例1: guidFor

    }, ({ name, source, owner }) => {
      let expandedName = source && this._resolveLocalLookupName(name, source, owner) || name;

      let ownerGuid = guidFor(owner);

      return ownerGuid + '|' + expandedName;
    });
开发者ID:fpauser,项目名称:ember.js,代码行数:7,代码来源:environment.ts

示例2: identity

function identity(item: any) {
  switch (typeof item) {
    case 'string':
    case 'number':
      return String(item);
    default:
      return guidFor(item);
  }
}
开发者ID:fpauser,项目名称:ember.js,代码行数:9,代码来源:iterable.ts

示例3: constructor

  constructor(mixins: Mixin[] | undefined, properties?: { [key: string]: any }) {
    this.properties = properties;
    this.mixins = buildMixinsArray(mixins);
    this.ownerConstructor = undefined;
    this._without = undefined;

    if (DEBUG) {
      this[NAME_KEY] = undefined;
      /*
        In debug builds, we seal mixins to help avoid performance pitfalls.

        In IE11 there is a quirk that prevents sealed objects from being added
        to a WeakMap. Unfortunately, the mixin system currently relies on
        weak maps in `guidFor`, so we need to prime the guid cache weak map.
      */
      guidFor(this);
      Object.seal(this);
    }
  }
开发者ID:realityendshere,项目名称:ember.js,代码行数:19,代码来源:mixin.ts

示例4: compile

 compile(builder: any) {
   builder.wrapLayout(this.template);
   builder.tag.static('div');
   builder.attrs.static('id', guidFor(this));
   builder.attrs.static('class', 'ember-view');
 }
开发者ID:fpauser,项目名称:ember.js,代码行数:6,代码来源:outlet.ts


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