title: How to pass values in constructor using sigleton() in typescript?
body: <p>I have a doubt about how to pass the value in the constructor using a singleton class in typescript.</p>
  
  <p><strong>mycode .ts</strong>  </p>
  
  <pre><code>import {singleton} from "tsyringe";
  
  @singleton()
  class Foo {
    constructor(data:string) 
  {
  this.data = data
  }
  }
  
  // some other file
  import "reflect-metadata";
  import {container} from "tsyringe";
  import {Foo} from "./foo";
  
  const instance = container.resolve(Foo);
  </code></pre>
  
  <p>how to pass a value in the constructor using constainer .resolve function .any one gives the example code how to pass the value.</p>