Skip to content

Commit 55c750a

Browse files
committed
Merge pull request DefinitelyTyped#8335 from johnnyreilly/master
Update angular.d.ts
2 parents c0d8766 + 49a2473 commit 55c750a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

angularjs/angular.d.ts

+12
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,19 @@ declare module angular {
274274
* Run blocks are the closest thing in Angular to the main method. A run block is the code which needs to run to kickstart the application. It is executed after all of the service have been configured and the injector has been created. Run blocks typically contain code which is hard to unit-test, and for this reason should be declared in isolated modules, so that they can be ignored in the unit-tests.
275275
*/
276276
run(inlineAnnotatedFunction: any[]): IModule;
277+
/**
278+
* Register a service constructor, which will be invoked with new to create the service instance. This is short for registering a service where its provider's $get property is a factory function that returns an instance instantiated by the injector from the service constructor function.
279+
*
280+
* @param name The name of the instance.
281+
* @param serviceConstructor An injectable class (constructor function) that will be instantiated.
282+
*/
277283
service(name: string, serviceConstructor: Function): IModule;
284+
/**
285+
* Register a service constructor, which will be invoked with new to create the service instance. This is short for registering a service where its provider's $get property is a factory function that returns an instance instantiated by the injector from the service constructor function.
286+
*
287+
* @param name The name of the instance.
288+
* @param inlineAnnotatedConstructor An injectable class (constructor function) that will be instantiated.
289+
*/
278290
service(name: string, inlineAnnotatedConstructor: any[]): IModule;
279291
service(object: Object): IModule;
280292
/**

0 commit comments

Comments
 (0)