本文整理匯總了TypeScript中@ember/-internals/meta.Meta.isSourceDestroying方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript Meta.isSourceDestroying方法的具體用法?TypeScript Meta.isSourceDestroying怎麽用?TypeScript Meta.isSourceDestroying使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類@ember/-internals/meta.Meta
的用法示例。
在下文中一共展示了Meta.isSourceDestroying方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: notifyObservers
function notifyObservers(obj: object, keyName: string, meta: Meta): void {
if (meta.isSourceDestroying()) {
return;
}
let eventName = changeEvent(keyName);
if (deferred > 0) {
observerSet.add(obj, keyName, eventName);
} else {
sendEvent(obj, eventName, [obj, keyName]);
}
}
示例2: dependentKeysDidChange
// called whenever a property has just changed to update dependent keys
function dependentKeysDidChange(obj: object, depKey: string, meta: Meta): void {
if (meta.isSourceDestroying() || !meta.hasDeps(depKey)) {
return;
}
let seen = SEEN_MAP;
let isTop = IS_TOP_SEEN_MAP;
if (isTop) {
IS_TOP_SEEN_MAP = false;
}
iterDeps(notifyPropertyChange, obj, depKey, seen, meta);
if (isTop) {
SEEN_MAP.clear();
IS_TOP_SEEN_MAP = true;
}
}