本文整理汇总了TypeScript中ember-debug.warn函数的典型用法代码示例。如果您正苦于以下问题:TypeScript warn函数的具体用法?TypeScript warn怎么用?TypeScript warn使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了warn函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: updateAttribute
updateAttribute(dom: Environment, element: Element, value: Opaque) {
warn(constructStyleDeprecationMessage(value), (() => {
if (value === null || value === undefined || isSafeString(value)) {
return true;
}
return false;
})(), { id: 'ember-htmlbars.style-xss-warning' });
super.updateAttribute(dom, element, value);
}
示例2: update
update(value: Opaque, env: GlimmerEnvironment): void {
warn(constructStyleDeprecationMessage(value), (() => {
if (value === null || value === undefined || isHTMLSafe(value)) {
return true;
}
return false;
})(), { id: 'ember-htmlbars.style-xss-warning' });
super.update(value, env);
}
示例3: get
let targetAttribute = get(this, 'target');
if (preventDefault !== false) {
if (!targetAttribute || targetAttribute === '_self') {
event.preventDefault();
}
}
if (get(this, 'bubbles') === false) { event.stopPropagation(); }
if (this._isDisabled) { return false; }
if (get(this, 'loading')) {
// tslint:disable-next-line:max-line-length
warn('This link-to is in an inactive loading state because at least one of its parameters presently has a null/undefined value, or the provided route name is invalid.', false, {
id: 'ember-glimmer.link-to.inactive-loading-state'
});
return false;
}
if (targetAttribute && targetAttribute !== '_self') {
return false;
}
let qualifiedRouteName = get(this, 'qualifiedRouteName');
let models = get(this, 'models');
let queryParams = get(this, 'queryParams.values');
let shouldReplace = get(this, 'replace');
let payload = {
queryParams,
示例4: get
let preventDefault = get(this, 'preventDefault');
let targetAttribute = get(this, 'target');
if (preventDefault !== false) {
if (!targetAttribute || targetAttribute === '_self') {
event.preventDefault();
}
}
if (get(this, 'bubbles') === false) { event.stopPropagation(); }
if (get(this, '_isDisabled')) { return false; }
if (get(this, 'loading')) {
// tslint:disable-next-line:max-line-length
warn('This link-to is in an inactive loading state because at least one of its parameters presently has a null/undefined value, or the provided route name is invalid.', false);
return false;
}
if (targetAttribute && targetAttribute !== '_self') {
return false;
}
let qualifiedRouteName = get(this, 'qualifiedRouteName');
let models = get(this, 'models');
let queryParams = get(this, 'queryParams.values');
let shouldReplace = get(this, 'replace');
let payload = {
queryParams,
routeName: qualifiedRouteName,