-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restructuring and a massive amount of extra documentation for TypeDoc
- Loading branch information
1 parent
d92fce4
commit 5d05863
Showing
21 changed files
with
552 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,66 @@ | ||
/// <reference path="../_references.d.ts" /> | ||
|
||
/** | ||
* A method which is called once an asynchronous operation has completed, an alternative | ||
* to using Promises. | ||
* @param T The type of object returned by the asynchronous operation. | ||
*/ | ||
export interface Callback<T> { | ||
/** | ||
* @param err The error object, if one occurred, otherwise null if the operation completed successfully. | ||
* @param object The result of the asynchronous operation if it completed successfully. If err is defined, the presence of this value is unknown. | ||
*/ | ||
(err: Error, object?: T): void; | ||
} | ||
|
||
/** | ||
* A method which is used to determine whether a value within a collection meets a set of criteria. | ||
* @param T The type of item in the collection. | ||
*/ | ||
export interface Predicate<T> { | ||
/** | ||
* @param object The value of the item in the collection | ||
* @param key The key, if one is available, under which the item appeared within the collection | ||
* @returns A true-y value if the item met the predicate conditions, false-y values if it did not. | ||
*/ | ||
(object: T, key?: string): boolean; | ||
} | ||
|
||
/** | ||
* A method which is called to retrieve a value of the given type. | ||
* @param T The type of value to be retrieved. | ||
*/ | ||
export interface PropertyGetter<T> { | ||
/** | ||
* Gets the current value of the property | ||
* @returns The current value | ||
*/ | ||
(): T; | ||
} | ||
|
||
/** | ||
* A method which is called to set a value of the given type. | ||
* @param T The type of value to set | ||
*/ | ||
export interface PropertySetter<T> { | ||
/** | ||
* Sets the value to the provided one | ||
* @param value The new value to set | ||
*/ | ||
(value: T): void; | ||
} | ||
|
||
/** | ||
* A compound property which provides either a getter, setter or both. | ||
* @param T The type of objects stored in the property | ||
*/ | ||
export interface Property<T> { | ||
/** | ||
* An optional getter which can be used to retrieve the property's value | ||
*/ | ||
get?: PropertyGetter<T>; | ||
/** | ||
* An optional setter which can be used to set the property's value | ||
*/ | ||
set?: PropertySetter<T>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.