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


TypeScript ember-debug.warn函数代码示例

本文整理汇总了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);
 }
开发者ID:fpauser,项目名称:ember.js,代码行数:9,代码来源:environment.ts

示例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);
 }
开发者ID:KirillSuhodolov,项目名称:ember.js,代码行数:9,代码来源:environment.ts

示例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,
开发者ID:GowthamMK,项目名称:ember.js,代码行数:31,代码来源:link-to.ts

示例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,
开发者ID:fpauser,项目名称:ember.js,代码行数:31,代码来源:link-to.ts


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