February 2019
Beginner
694 pages
18h 4m
English
We are not quite finished with the declaration file for the ErrorHelper class just yet. If we take a look at the original JavaScript usage of the ErrorHelper class, we will notice that the containsErrors function also allows for the failure property of responseText to be a string:
var failureMessage = {
responseText : {
"failure" : "true",
"errorMessage" : "Error Message from Typescript"
}
}
If we compile this code now, we will get the following compile error:

In the preceding definition of the failureMessageString variable, the type of the "failure" property is "true", which is of type string , and not true, which is of type ...
Read now
Unlock full access