I am creating a builder that has types, the way I declare the type is:
export type BuilderInterface<T> = {
[key in keyof T]: (arg: T[key]) => BuilderInterface<T> } & {
build(): T
}
When running ESLint it complains saying that: "BuilderInteface" was used before it was defined (no-use-before-define). What is normal since I need to assert that each argument functions returns a builder of the same kind.
Which ways do I have to declare this without breaking the eslint rule? Should I ignore the rule directly? Why?