Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/NativeScript/NativeScript
/ lazy
Function
lazy
packages/core/utils/lazy.ts:1–5 ·
view source on GitHub ↗
(action: () => T)
Source
from the content-addressed store, hash-verified
1
export
default
function
lazy<T>(action: () => T): () => T {
2
let
_value: T;
3
4
return
() => _value || (_value = action());
5
}
Callers
7
application.android.ts
File · 0.50
fragment.transitions.android.ts
File · 0.50
index.android.ts
File · 0.50
slide-transition.android.ts
File · 0.50
index.android.ts
File · 0.50
xml-parser-tests.ts
File · 0.50
image-cache-tests.ts
File · 0.50
Calls
1
action
Function · 0.50
Tested by
no test coverage detected