title: How can I cast input JSON object to model class in Node.JS with TypeScript?
body: <p>I am writing my Node.js server using TypeScript and express framework. 
  This is how my controller and route looks like:</p>
  
  <pre><code>  export class AuthController {
  
          public async signUpNewUser(request: Request, response: Response) {
          ...
      }
  }
  </code></pre>
  
  <p>How can I receive a model class instead Request type like in ASP.NET ?
  Something like:</p>
  
  <pre><code>public async signUpNewUser(input: SignUpModel, response: Response) {
  </code></pre>
  
  <p>Is this a good idea at all? I am not sure this is a common approach in the Node.JS
  I just want to make sure I get the same model each time and write a code related to this model and not on dynamic JSON object.</p>
  
  <p>My suggestion is to convert to strong type model at the beginning of the route, but I am not sure this is a good way. </p>
  
  <p>Does somebody have a solution for such cases?</p>