cleanup(docs): Edited API docs

This commit is contained in:
Naomi Black
2015-04-10 11:15:01 -07:00
parent 2ed7622239
commit e295940833
17 changed files with 197 additions and 22 deletions

View File

@ -1,10 +1,37 @@
/**
* Indicates that the result of a [Pipe] transformation has not changed since the last time the pipe was called.
*
* Suppose we have a pipe that computes changes in an array by performing a simple diff operation. If
* we call this pipe with the same array twice, it will return `NO_CHANGE` the second time.
*
* @exportedAs angular2/pipes
*/
export var NO_CHANGE = new Object();
/**
* @exportedAs angular2/angular2
* An interface for extending the list of pipes known to Angular.
*
* If you are writing a custom [Pipe], you must extend this interface.
*
* #Example
*
* ```
* class DoublePipe extends Pipe {
* supports(obj) {
* return true;
* }
*
* transform(value) {
* return `${value}${value}`;
* }
* }
* ```
*
* @exportedAs angular2/pipes
*/
export class Pipe {
supports(obj):boolean {return false;}
onDestroy() {}
transform(value:any):any {return null;}
}
}