I want to create a type or an interface with typescript from a javascript object that I don't know how it's created.
for example I want to create a type Request to use it in my function so I can make sure I pass the right parameter to the function :
let req = require("somewhere"); // my javascript object
function myfunction(request : Request) {
// some code
}
myfunction(req);// ok
myfunction(20);// Error
how can I create the Request type