MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / isTdz

Function isTdz

packages/vite/hmr/client/utils.ts:11–11  ·  view source on GitHub ↗
(err: any)

Source from the content-addressed store, hash-verified

9 */
10export async function safeReadDefault(mod: any): Promise<any | null> {
11 const isTdz = (err: any) => /before initialization|TDZ/i.test(String(err?.message || err || ''));
12 // Attempt immediate read
13 try {
14 return mod?.default ?? mod ?? null;

Callers 1

safeReadDefaultFunction · 0.85

Calls 2

StringClass · 0.50
testMethod · 0.45

Tested by

no test coverage detected