@platformatic/globals 3.63.0-alpha.3 → 3.64.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/lib/index.d.ts +9 -0
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -147,6 +147,15 @@ export interface PlatformaticGlobal {
|
|
|
147
147
|
/** @deprecated Use `PlatformaticGlobal` instead. */
|
|
148
148
|
export type PlatformaticGlobalInterface = PlatformaticGlobal
|
|
149
149
|
|
|
150
|
+
// updateGlobals() (see lib/index.js) assigns a real, shared
|
|
151
|
+
// `globalThis.platformatic` object at worker/main-thread startup. Consumers
|
|
152
|
+
// that read the global directly (rather than via the getters below) need an
|
|
153
|
+
// ambient declaration to type it.
|
|
154
|
+
declare global {
|
|
155
|
+
// eslint-disable-next-line no-var
|
|
156
|
+
var platformatic: PlatformaticGlobal | undefined
|
|
157
|
+
}
|
|
158
|
+
|
|
150
159
|
export declare function getGlobal<T extends {}> (): (PlatformaticGlobal & T) | undefined
|
|
151
160
|
export declare function updateGlobals (updates: Partial<PlatformaticGlobal>): PlatformaticGlobal
|
|
152
161
|
export declare function removeGlobals (fields: string[]): PlatformaticGlobal | undefined
|