@ms-cloudpack/common-types-browser 0.6.3 → 0.6.5
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/README.md +2 -2
- package/global.d.ts +8 -0
- package/index.d.ts +8 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,8 +4,8 @@ This package provides Cloudpack types that are specific to the browser environme
|
|
|
4
4
|
|
|
5
5
|
## Import types directly
|
|
6
6
|
|
|
7
|
-
```
|
|
8
|
-
import { PageSessionContext } from '@ms-cloudpack/common-types-browser';
|
|
7
|
+
```ts
|
|
8
|
+
import type { PageSessionContext } from '@ms-cloudpack/common-types-browser';
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
This is useful for server code, since it **does not** define the `window.__cloudpack` global.
|
package/global.d.ts
CHANGED
|
@@ -7,5 +7,13 @@ declare global {
|
|
|
7
7
|
__cloudpack?: CloudpackGlobal;
|
|
8
8
|
/** Track uncaught errors (defined in `errorHandler.inline.ts` and read by the overlay) */
|
|
9
9
|
__pageErrors?: PageErrorsGlobal;
|
|
10
|
+
|
|
11
|
+
/** React Refresh runtime (defined in `overlay/src/registerReactRefresh.ts`) */
|
|
12
|
+
$RefreshReg$?: (type: unknown, id: string) => void;
|
|
13
|
+
$RefreshSig$?: () => (type: unknown) => unknown;
|
|
14
|
+
$RefreshRuntime$?: {
|
|
15
|
+
performReactRefresh: () => unknown;
|
|
16
|
+
register: (type: unknown, id: string) => void;
|
|
17
|
+
};
|
|
10
18
|
}
|
|
11
19
|
}
|
package/index.d.ts
CHANGED
|
@@ -42,6 +42,12 @@ export interface PageSessionContext {
|
|
|
42
42
|
* @default 'always'
|
|
43
43
|
*/
|
|
44
44
|
showOverlay: 'always' | 'errors-only' | 'never' | undefined;
|
|
45
|
+
|
|
46
|
+
/** Feature flags for browser runtime */
|
|
47
|
+
features: {
|
|
48
|
+
/** Whether to enable HMR */
|
|
49
|
+
hmr: boolean;
|
|
50
|
+
};
|
|
45
51
|
}
|
|
46
52
|
|
|
47
53
|
/**
|
|
@@ -62,6 +68,8 @@ export interface BootstrapInput {
|
|
|
62
68
|
pageSessionContext: PageSessionContext;
|
|
63
69
|
/** Additional entry module import paths, to be added as script tags */
|
|
64
70
|
entryScripts?: string[];
|
|
71
|
+
/** Defer execution of scripts until the entry has loaded (default: false). */
|
|
72
|
+
deferScripts?: boolean;
|
|
65
73
|
}
|
|
66
74
|
|
|
67
75
|
/** Types for `window.__cloudpack` */
|