You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class Test extends JSONObject {
@required
// @ts-ignore
public prop1: String
@required
@array(String)
// @ts-ignore
public prop2: Array<String>
}
try {
let test: Test = new Test({
"prop1": "hello",
"prop2": [5, 8]
})
}
catch(e) {
console.log("error " + e.toString())
}
I have the following error : Test.prop2 array element requires type 'number', got 'string' instead, while the error should be Test.prop2 array element requires type 'string', got 'string' number (confusing expected and actual array elements type)
The text was updated successfully, but these errors were encountered:
Consider this code :
I have the following error :
Test.prop2 array element requires type 'number', got 'string' instead
, while the error should beTest.prop2 array element requires type 'string', got 'string' number
(confusing expected and actual array elements type)The text was updated successfully, but these errors were encountered: