Closed
Description
Is it possible to determine which property is valid on an object from the AssertType
function? Currently I only see Type assertion failed
Something like the following would be helpful:
interface MyRequest {
name: string,
age: number
}
try {
const asString = assertType<MyRequest>(unknownObj);
} catch (e) {
console.log('error: ', e); // "error: Object does not have property: 'name' "
}
Metadata
Metadata
Assignees
Labels
No labels