title: Understanding Inject, Injectable and InjectRepository in nest
body: <p>I come from non typescript and non nest background. I was reviewing the code and I found this piece of code snippet</p>
  <pre><code>import { Inject, Injectable } from '@nestjs/common';
  import { InjectRepository } from '@nestjs/typeorm';
  import { AreaService } from '../area/-area.service';
  import { Repository } from 'typeorm';
  import { Office } from './office.entity';
  import { OfficeInterface } from './office.interface';
  
  @Injectable()
  export class OfficeService {
    constructor(
      @Inject(AreaService)
      private readonly AreaService: AreaService,
      @InjectRepository(Office)
      private readonly OfficeRepository: Repository&lt;Office&gt;,
    ) {}
  </code></pre>
  <p>Now this is, honestly, quiet overwhelming for me. I went to <a href="https://docs.nestjs.com/fundamentals/injection-scopes" rel="noreferrer">Nest JS page</a> to understand this and this what they have to say</p>
  <blockquote>
  <p>For people coming from different programming language backgrounds, it
  might be unexpected to learn that in Nest, almost everything is shared
  across incoming requests. We have a connection pool to the database,
  singleton services with global state, etc. Remember that Node.js
  doesn't follow the request/response Multi-Threaded Stateless Model in
  which every request is processed by a separate thread. Hence, using
  singleton instances is fully safe for our application</p>
  </blockquote>
  <p>Do they mean in the above statement that they add everything to request object in <code>nestJS</code>?</p>
  <pre><code>import { Injectable, Scope } from '@nestjs/common';
  
  @Injectable({ scope: Scope.REQUEST })
  export class CatsService {}
  
  Specify injection scope by passing the scope property to the @Injectable() decorator options object:
  </code></pre>
  <p>So if we do <code>@Injectable()</code> what scope is it going to have?</p>
  <p>Can someone please explain me difference between <code>@Injectable()</code>, <code>  @Inject(AreaService)</code> and <code>  @InjectRepository(Office)</code> and when, which one should be used?</p>