Consider disabling `typescript/no-use-before-define` for `typedefs`
yokuze opened this issue · 0 comments
yokuze commented
In TypeScript, type
definitions are hoisted, so it is valid to reference a type that is declared later on in the file. We may want to allow this so that we can organize the types in a given file hierarchically. For example:
export type TheMainPointOfThisFile = DogOrCat | LiteralDogOrCat;
type DogOrCat = EitherThis | OrThis;
type LiteralDogOrCat = 'cat' | 'dog';
interface EitherThis {
isADog: boolean;
}
interface OrThis {
isACat: boolean;
}