@maravilla-labs/types 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/global.d.ts ADDED
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Ambient `platform` global available inside the Maravilla runtime.
3
+ *
4
+ * Kept in a dedicated declaration file (rather than `index.ts`) so that
5
+ * importing the platform *types* (`AuthService`, `DbDocument`, etc.) from
6
+ * `@maravilla-labs/types` does not force this ambient `const platform`
7
+ * into the importer's global scope — `@maravilla-labs/platform` ships its
8
+ * own `getPlatform()` and a (deliberately different) ambient `var platform`
9
+ * declaration, and the two must not collide.
10
+ *
11
+ * Reference it explicitly from app/runtime code that relies on the global:
12
+ *
13
+ * ```ts
14
+ * /// <reference types="@maravilla-labs/types/global" />
15
+ * ```
16
+ */
17
+ import type { Platform } from './index.js';
18
+
19
+ declare global {
20
+ const platform: Platform;
21
+ }
22
+
23
+ export {};