mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-01 19:45:48 +08:00
9 lines
206 B
TypeScript
9 lines
206 B
TypeScript
import lazyValue = require("lazy-value");
|
|
|
|
declare function expensiveComputation(): string;
|
|
declare function doSomething(x: string): void;
|
|
|
|
const val = lazyValue(expensiveComputation);
|
|
|
|
doSomething(val());
|