TypeScript 4.9 introduces satisfies operator. It makes such that an expression satisfy an interface.
Example
In the following code, the compiler makes sure that myConfigSettings satisfies ConfigSettings, even though the actual type of myConfigSettings is the same.