client-ts: Port services/validation_error

This commit is contained in:
Elian Doran 2024-07-24 23:30:10 +03:00
parent 380f4a1d54
commit 3fbedfb0a1
No known key found for this signature in database
2 changed files with 7 additions and 7 deletions

View File

@ -1,7 +0,0 @@
export default class ValidationError {
constructor(resp) {
for (const key in resp) {
this[key] = resp[key];
}
}
}

View File

@ -0,0 +1,7 @@
export default class ValidationError {
constructor(resp: Record<string, string | number>) {
for (const key in resp) {
(this as any)[key] = resp[key];
}
}
}