Note: A satisfies
operator may improve this issue. A detailed discussion of this is here: microsoft/TypeScript#47920
Using as
in TypeScript is usually bad, since it can downcast your type. Example:
type Dog = { name: string; breed: string };
const puppy = { name: 'Spot' } as Dog;