From 3fbedfb0a165074a740dc06b42477712de22a9ee Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Wed, 24 Jul 2024 23:30:10 +0300 Subject: [PATCH] client-ts: Port services/validation_error --- src/public/app/services/validation_error.js | 7 ------- src/public/app/services/validation_error.ts | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) delete mode 100644 src/public/app/services/validation_error.js create mode 100644 src/public/app/services/validation_error.ts diff --git a/src/public/app/services/validation_error.js b/src/public/app/services/validation_error.js deleted file mode 100644 index 6d3423e6c..000000000 --- a/src/public/app/services/validation_error.js +++ /dev/null @@ -1,7 +0,0 @@ -export default class ValidationError { - constructor(resp) { - for (const key in resp) { - this[key] = resp[key]; - } - } -} \ No newline at end of file diff --git a/src/public/app/services/validation_error.ts b/src/public/app/services/validation_error.ts new file mode 100644 index 000000000..a37841a89 --- /dev/null +++ b/src/public/app/services/validation_error.ts @@ -0,0 +1,7 @@ +export default class ValidationError { + constructor(resp: Record) { + for (const key in resp) { + (this as any)[key] = resp[key]; + } + } +} \ No newline at end of file