`types` are not exported by default from `utils` folder
I have a few types in a validation file inside the
utils
utils
folder. The schemas that I exported are auto-imported but the types are not. How do i declare types globally?
here is a snapshot of the
validation.ts
validation.ts
file:
import { object, string, number, date, boolean, InferType } from "yup";export const PaymentSchema = object({ paymentMethod: string().oneOf(["Direct Payment", "Bank Transfer"]).required("Select a method"), transactionId: string().min(3).required("Enter the receipt ID"),});// This is not auto-imported in any fileexport type TPayment = InferType<typeof PaymentSchema>;
import { object, string, number, date, boolean, InferType } from "yup";export const PaymentSchema = object({ paymentMethod: string().oneOf(["Direct Payment", "Bank Transfer"]).required("Select a method"), transactionId: string().min(3).required("Enter the receipt ID"),});// This is not auto-imported in any fileexport type TPayment = InferType<typeof PaymentSchema>;
Thanks for the help.
Recent Announcements
Continue the conversation
Join the Discord to ask follow-up questions and connect with the community