SvelteKit universal layout load (+layout.ts) that returns different object shapes across branches (e.g. SSR path returns {is_staff, is_registered, ...} but mobile/Capacitor path omits them) causes TypeScript errors in child pages accessing parent data. SvelteKit infers PageParentData as a union of all return types, so properties only present in some branches become undefined in the union. svelte-check reports 'Property X does not exist on type PageParentData' even though the server layout (+layout.server.ts) always returns the field — because +layout.ts strips it by not including it in every return path.
Every return path in +layout.ts must include the same set of properties for the union type to be useful. When adding a new field to the server layout data (+layout.server.ts), you must also add it (with a sensible default like false or null) to EVERY return statement in +layout.ts — including mobile/fallback/error branches. Otherwise child pages that access parent_data.newField will get a type error because the union type doesn't guarantee the field exists. Pattern: grep for return { in your +layout.ts and ensure each one has the new field.