本文整理汇总了TypeScript中@glimmer/reference.UpdatableTag类的典型用法代码示例。如果您正苦于以下问题:TypeScript UpdatableTag类的具体用法?TypeScript UpdatableTag怎么用?TypeScript UpdatableTag使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了UpdatableTag类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: 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
示例2: 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
示例3: 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
示例4: 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
示例5: constructor
constructor(parentValue: any, propertyKey: string) {
super();
this._parentValue = parentValue;
this._propertyKey = propertyKey;
if (EMBER_METAL_TRACKED_PROPERTIES) {
this._propertyTag = UpdatableTag.create(CONSTANT_TAG);
} else {
this._propertyTag = UpdatableTag.create(tagForProperty(parentValue, propertyKey));
}
if (DEBUG) {
this.tag = TwoWayFlushDetectionTag.create(this._propertyTag, propertyKey, this);
} else {
this.tag = this._propertyTag;
}
if (DEBUG) {
watchKey(parentValue, propertyKey);
}
}
开发者ID:cibernox,项目名称:ember.js,代码行数:22,代码来源:references.ts
示例6: 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
示例7: 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
示例8: tagForProperty
export function tagForProperty(object: any, propertyKey: string | symbol, _meta?: Meta): Tag {
let objectType = typeof object;
if (objectType !== 'function' && (objectType !== 'object' || object === null)) {
return CONSTANT_TAG;
}
let meta = _meta === undefined ? metaFor(object) : _meta;
if (EMBER_METAL_TRACKED_PROPERTIES) {
if (!(propertyKey in object) && typeof object[UNKNOWN_PROPERTY_TAG] === 'function') {
return object[UNKNOWN_PROPERTY_TAG](propertyKey);
}
} else 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)]);
if (DEBUG) {
if (EMBER_METAL_TRACKED_PROPERTIES) {
setupMandatorySetter!(object, propertyKey);
}
(pair as any)._propertyKey = propertyKey;
}
return (tags[propertyKey] = pair);
} else {
return (tags[propertyKey] = makeTag());
}
}
开发者ID:emberjs,项目名称:ember.js,代码行数:37,代码来源:tags.ts
注:本文中的@glimmer/reference.UpdatableTag类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论