There is strange error appearing A function returning 'never' cannot have a reachable end), on statement : never
interface Result {
data: string;
}
function logResult(config: Result): never {
console.log(config.data)
}
logResult({ data: 'This is a test' });
I've created a typescript playground example with code above
What I am doing wrong and why this error appears?