當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript reference.combine函數代碼示例

本文整理匯總了TypeScript中@glimmer/reference.combine函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript combine函數的具體用法?TypeScript combine怎麽用?TypeScript combine使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了combine函數的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: constructor

  constructor(instance: HelperInstance, args: CapturedArguments) {
    super();

    this.tag = combine([instance[RECOMPUTE_TAG], args.tag]);
    this.instance = instance;
    this.args = args;
  }
開發者ID:cibernox,項目名稱:ember.js,代碼行數:7,代碼來源:references.ts

示例2: constructor

  constructor(ref: UpdatableReference, keyFor: (value: any, memo: any) => any) {
    this.ref = ref;
    this.keyFor = keyFor;

    let valueTag = this.valueTag = UpdatableTag.create(CONSTANT_TAG);

    this.tag = combine([ref.tag, valueTag]);
  }
開發者ID:fpauser,項目名稱:ember.js,代碼行數:8,代碼來源:iterable.ts

示例3: constructor

  constructor(parentReference: any, propertyKey: string) {
    super();

    let parentReferenceTag = parentReference.tag;
    let parentObjectTag = UpdatableTag.create(CONSTANT_TAG);

    this._parentReference = parentReference;
    this._parentObjectTag = parentObjectTag;
    this._propertyKey = propertyKey;

    if (EMBER_GLIMMER_DETECT_BACKTRACKING_RERENDER) {
      let tag = combine([parentReferenceTag, parentObjectTag]);
      this.tag = new TwoWayFlushDetectionTag(tag, propertyKey, this);
    } else {
      this.tag = combine([parentReferenceTag, parentObjectTag]);
    }
  }
開發者ID:jasonmit,項目名稱:ember.js,代碼行數:17,代碼來源:references.ts

示例4: constructor

 constructor(outletNameRef: any, parentOutletStateRef: any) {
   this.outletNameRef = outletNameRef;
   this.parentOutletStateRef = parentOutletStateRef;
   this.definition = null;
   this.lastState = null;
   let outletStateTag = this.outletStateTag = UpdatableTag.create(parentOutletStateRef.tag);
   this.tag = combine([outletStateTag.inner, outletNameRef.tag]);
 }
開發者ID:fpauser,項目名稱:ember.js,代碼行數:8,代碼來源:outlet.ts

示例5: getChainTagsForKeys

export function getChainTagsForKeys(obj: any, keys: string[]) {
  let chainTags: Tag[] = [];

  for (let i = 0; i < keys.length; i++) {
    chainTags.push(getChainTagsForKey(obj, keys[i]));
  }

  return combine(chainTags);
}
開發者ID:emberjs,項目名稱:ember.js,代碼行數:9,代碼來源:chain-tags.ts

示例6: constructor

  constructor(cond: any, truthy: any, falsy: any) {
    super();

    this.branchTag = UpdatableTag.create(CONSTANT_TAG);
    this.tag = combine([cond.tag, this.branchTag]);

    this.cond = cond;
    this.truthy = truthy;
    this.falsy = falsy;
  }
開發者ID:habdelra,項目名稱:ember.js,代碼行數:10,代碼來源:if-unless.ts

示例7: constructor

  constructor(sourceReference: VersionedPathReference<Opaque>, pathReference: PathReference<string>) {
    super();
    this.sourceReference = sourceReference;
    this.pathReference = pathReference;

    this.lastPath = null;
    this.innerReference = NULL_REFERENCE;

    let innerTag = this.innerTag = UpdatableTag.create(CONSTANT_TAG);

    this.tag = combine([sourceReference.tag, pathReference.tag, innerTag]);
  }
開發者ID:GowthamMK,項目名稱:ember.js,代碼行數:12,代碼來源:get.ts

示例8: tagForProperty

export function tagForProperty(object: any, propertyKey: string | symbol, _meta?: Meta): Tag {
  if (typeof object !== 'object' || object === null) {
    return CONSTANT_TAG;
  }
  let meta = _meta === undefined ? metaFor(object) : _meta;

  if (isProxy(object)) {
    return tagFor(object, meta);
  }

  let tags = meta.writableTags();
  let tag = tags[propertyKey];
  if (tag) {
    return tag;
  }

  if (EMBER_METAL_TRACKED_PROPERTIES) {
    let pair = combine([makeTag(), UpdatableTag.create(CONSTANT_TAG)]);
    return (tags[propertyKey] = pair);
  } else {
    return (tags[propertyKey] = makeTag());
  }
}
開發者ID:GreatWizard,項目名稱:ember.js,代碼行數:23,代碼來源:tags.ts


注:本文中的@glimmer/reference.combine函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。