Skip to content
Snippets Groups Projects
Commit 69b93951 authored by michael.minelli's avatar michael.minelli
Browse files

LazyVal => Add possibility to give directly the value

parent aa038f29
No related branches found
No related tags found
No related merge requests found
class LazyVal<T> {
private val: T = null;
constructor(private valLoader: () => Promise<T>) {}
constructor(private valLoader: () => Promise<T> | T) {}
get value(): Promise<T> {
return new Promise<T>(async (resolve) => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment