{
  "id": "api/core/TypeProvider",
  "title": "TypeProvider",
  "contents": "\n\n<article>\n  <div class=\"breadcrumb-container\">\n    <div class=\"breadcrumb\">\n      <script type=\"application/ld+json\">\n        {\n          \"@context\": \"http://schema.org\",\n          \"@type\": \"BreadcrumbList\",\n          \"itemListElement\": [\n            { \"@type\": \"ListItem\", \"position\": 1, \"item\": { \"@id\": \"https://angular.io//api\", \"name\": \"API\" } },\n            { \"@type\": \"ListItem\", \"position\": 2, \"item\": { \"@id\": \"https://angular.io/api/core\", \"name\": \"@angular/core\" } },\n            { \"@type\": \"ListItem\", \"position\": 3, \"item\": { \"@id\": \"https://angular.io/api/core/TypeProvider\", \"name\": \"TypeProvider\" } }\n          ]\n        }\n      </script>\n        <a href=\"/api\">API</a> > <a href=\"api/core\">@angular/core</a>\n    </div>\n    <div class=\"github-links\">\n  <a href=\"https://github.com/angular/angular/edit/master/packages/core/src/di/interface/provider.ts?message=docs(core)%3A%20describe%20your%20change...#L260-L276\" aria-label=\"Suggest Edits\" title=\"Suggest Edits\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">mode_edit</i></a>\n  <a href=\"https://github.com/angular/angular/tree/12.0.0-next.7/packages/core/src/di/interface/provider.ts#L260-L276\" aria-label=\"View Source\" title=\"View Source\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">code</i></a>\n</div>\n  </div>\n  \n  <header class=\"api-header\">\n    <h1 id=\"typeprovider\">TypeProvider<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/core/TypeProvider#typeprovider\"><i class=\"material-icons\">link</i></a></h1>\n    \n    <label class=\"api-type-label interface\">interface</label>\n    \n    \n    \n  </header>\n  \n  <aio-toc class=\"embedded\"></aio-toc>\n\n  <div class=\"api-body\">\n    \n  <section class=\"short-description\">\n    <p>Configures the <code><a href=\"api/core/Injector\" class=\"code-anchor\">Injector</a></code> to return an instance of <code><a href=\"api/core/Type\" class=\"code-anchor\">Type</a></code> when `Type' is used as the token.</p>\n\n    <p><a href=\"api/core/TypeProvider#description\">See more...</a></p>\n  </section>\n  \n  \n  <section class=\"interface-overview\">\n<code-example language=\"ts\" hidecopy=\"true\">\ninterface <a href=\"api/core/TypeProvider\" class=\"code-anchor\">TypeProvider</a> extends <a class=\"code-anchor\" href=\"api/core/Type\">Type<any></any></a> {\n\n  // inherited from <a class=\"code-anchor\" href=\"api/core/Type\">core/Type</a>\n  <a class=\"code-anchor\" href=\"api/core/Type#new_0()\"><span class=\"member-name\">constructor</span>(...args: any[]): T</a>\n}\n</code-example>\n\n  \n  \n\n\n  \n  \n\n</section>\n\n  \n\n  \n  \n<section class=\"description\">\n  <h2 id=\"description\">Description<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/core/TypeProvider#description\"><i class=\"material-icons\">link</i></a></h2>\n  <p>Create an instance by invoking the <code>new</code> operator and supplying additional arguments.\nThis form is a short form of <code><a href=\"api/core/TypeProvider\" class=\"code-anchor\">TypeProvider</a></code>;</p>\n<p>For more details, see the <a href=\"guide/dependency-injection\">\"Dependency Injection Guide\"</a>.</p>\n\n  <p>Further information available in the <a href=\"api/core/TypeProvider#usage-notes\">Usage Notes</a>...</p>\n</section>\n\n  \n\n  \n\n\n  \n<section class=\"usage-notes\">\n  <h2 id=\"usage-notes\">Usage notes<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/core/TypeProvider#usage-notes\"><i class=\"material-icons\">link</i></a></h2>\n  <code-example path=\"core/di/ts/provider_spec.ts\" region=\"TypeProvider\">\n@<a href=\"api/core/Injectable\" class=\"code-anchor\">Injectable</a>()\nclass Greeting {\n  salutation = 'Hello';\n}\n\nconst injector = ReflectiveInjector.resolveAndCreate([\n  Greeting,  // Shorthand for { provide: Greeting, useClass: Greeting }\n]);\n\nexpect(injector.get(Greeting).salutation).toBe('Hello');\n\n</code-example>\n\n</section>\n\n\n\n  </div>\n</article>\n\n<!-- links to this doc:\n - api/core\n - api/core/Provider\n-->\n<!-- links from this doc:\n - /api\n - api/core\n - api/core/Injectable\n - api/core/Injector\n - api/core/Type\n - api/core/Type#new_0()\n - api/core/TypeProvider#description\n - api/core/TypeProvider#typeprovider\n - api/core/TypeProvider#usage-notes\n - guide/dependency-injection\n - https://github.com/angular/angular/edit/master/packages/core/src/di/interface/provider.ts?message=docs(core)%3A%20describe%20your%20change...#L260-L276\n - https://github.com/angular/angular/tree/12.0.0-next.7/packages/core/src/di/interface/provider.ts#L260-L276\n-->"
}