angular - Separate interfaces for each lifecycle hook (#16299)

* Separate interfaces for each lifecycle hook

Having one required hook per interface leads to greater type safety than
having a single IController interface with all properties optional.
Namely, the IController interface will not help you if you misspell a hook
name. (A slight improvement, admittedly, but an improvement nonetheless.)

This is closer to how the typings are done for lifecycle hooks in ng2.

* Use `dtslint`

* Fix trailing whitespace
This commit is contained in:
Caleb St-Denis
2017-05-03 15:02:48 -04:00
committed by Mohamed Hegazy
parent f782f81c7a
commit 514a27de01
2 changed files with 73 additions and 2 deletions

View File

@@ -17,4 +17,4 @@
"unified-signatures": false,
"void-return": false
}
}
}