2017-10-05 4 views
0

I持っているデリゲートと、次のコード:縮小後 活字エラー後の縮小化

 $.ajax(this.validateURL, { 
     type: "post", 
     url: this.validateURL, 
     data: JSON.stringify(data), 
     contentType: "application/json; charset=utf-8", 
     dataType: "json", 
     success: function (response) { 
      solicitacion.procedure.set("GenarateSample", true); 
      if (!response.Success) { 
       notification.Show(response.Message, NotificationType.Error); 
       return false; 
      } else { 
       if (response.Message.length > 3) { 
        this.confirm(solicitacion); 
       } else { 
        this.adicionarprocedureNaGrid(solicitacion, false); 
       } 
       return true; 
      } 
     }, 
     error: e => { 
      error_handler(e); 
     } 
    }); 

<pre> $.ajax(this.validateURL, { 
    type: "post", 
    url: this.validateURL, 
    data: JSON.stringify(i), 
    contentType: "application/json; charset=utf-8", 
    dataType: "json", 
    success: i => t.procedure.set("GenarateSample", !0), 
    i.Success? (i.Message.length > 3 ? this.confirmarprocedure(t) : this.adicionarprocedureNaGrid(t, !1), !0) : (n.Show(i.Message, NotificationType.Error), !1), 
    error: n => { 
     error_handler(n) 
    } 
}) </pre> 

Whitoutデリゲートは、縮小は正しいです:あなたは縮小を実行する必要が

 

    $.ajax(this.validateURL, { 
     type: "post", 
     url: this.validateURL, 
     data: JSON.stringify(i), 
     contentType: "application/json; charset=utf-8", 
     dataType: "json", 
     success: function (i) { 
      return t.procedure.set("GenarateSample", !0), 
       i.Success? (i.Message.length > 3 ? this.confirmarprocedure(t) : this.adicionarprocedureNaGrid(t, !1), !0) : (n.Show(i.Message, NotificationType.Error), !1) 
     }, 
     error: n => { 
      error_handler(n) 
     } 
    })
+1

あなたは矢印の意味ですか? ES2015ではサポートされていません。 – Niladri

答えて

0

の後に、TypeScriptコンパイラがその作業を完了しました。

typescriptファイル(.TS)

const a = (y: string) => { 
    return y; 
} 

const b = function (y: string) { 
    return y; 
} 

は(.jsファイル)

var a = function (y) { 
    return y; 
}; 
var b = function (y) { 
    return y; 
}; 

だから活字体ソースファイル、コンパイルされたJavaScriptをない縮小化し、それが動作するJavaScriptにコンパイルします。

+0

私はテストするつもりです、指示と同様のものに変更します –