Evaluate lazily android specific global values

This commit is contained in:
Jason Zhekov
2016-04-20 17:21:29 +03:00
parent 615bbc9f2e
commit 826ab252e4
7 changed files with 55 additions and 36 deletions

8
utils/lazy.d.ts vendored Normal file
View File

@@ -0,0 +1,8 @@
declare module "utils/lazy" {
/**
* A function that evaluates the action only once.
* @param action The action to be evaluated to get the result.
* Returns the evaluated result.
*/
export default function lazy<T>(action: () => T): () => T;
}