title: How to convert type to class with typescript compiler api
body: <p>I want to convert a type to a class with 'class-validator' Declaration;
  as :</p>
  <pre><code>    type a = {
        aa: string,
        bb: number,
      }
  </code></pre>
  <p>to</p>
  <pre><code>    class a {
        @IsString()
        aa: string
        @IsNumber()
        bb:number
      }
  </code></pre>
  <p>I think that i should visit typeNode of <em>type a</em>.But i don't know how to do it.
  or is there any better method .</p>