Skip to content

Build your personal knowledge base with Trilium Notes

client-ts: Port services/validation_error

Elian Doran3fbedfb0a165
diff --git a/src/public/app/services/validation_error.js b/src/public/app/services/validation_error.js
deleted file mode 100644
index 6d3423e6c2..0000000000
--- 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 0000000000..a37841a891
--- /dev/null
+++ b/src/public/app/services/validation_error.ts
@@ -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];
+ }
+ }
+}
\ No newline at end of file