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
I have an Angular application and I'm creating a PayloadValidationService which has a generic function that uses typia's validateEqual to validate objects:
import { Injectable } from "@angular/core";
import typia from "typia";
@Injectable({
providedIn: 'root'
})
export class PayloadValidationService {
validatePayload<T>(payload: object): void {
console.log(typia.validateEquals<T>(payload)); // There will be additional functionality if the result is an error
}
}
ERROR Error: Error on typia.validateEquals(): no transform has been configured. Read and follow https://typia.io/docs/setup please.
If I use the validateEquals directly with my interface and not use generics (e.g. typia.validateEquals<MyPayload>(data)), everything works normally without any errors.
Is there any way to make it work with generics?
Angular version: 17
Typia version: "^5.4.0"
I have run npm install typia and npx typia setup
The text was updated successfully, but these errors were encountered:
I have an Angular application and I'm creating a PayloadValidationService which has a generic function that uses typia's
validateEqual
to validate objects:I am using the function as follows:
This throws the following error in the console:
ERROR Error: Error on typia.validateEquals(): no transform has been configured. Read and follow https://typia.io/docs/setup please.
If I use the
validateEquals
directly with my interface and not use generics (e.g.typia.validateEquals<MyPayload>(data)
), everything works normally without any errors.Is there any way to make it work with generics?
Angular version: 17
Typia version:
"^5.4.0"
I have run
npm install typia
andnpx typia setup
The text was updated successfully, but these errors were encountered: