vite 2.9.0-beta.7 → 2.9.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.

Potentially problematic release.


This version of vite might be problematic. Click here for more details.

package/types/hot.d.ts ADDED
@@ -0,0 +1,25 @@
1
+ import type { InferCustomEventPayload } from './customEvent'
2
+
3
+ export interface ViteHotContext {
4
+ readonly data: any
5
+
6
+ accept(): void
7
+ accept(cb: (mod: any) => void): void
8
+ accept(dep: string, cb: (mod: any) => void): void
9
+ accept(deps: readonly string[], cb: (mods: any[]) => void): void
10
+
11
+ /**
12
+ * @deprecated
13
+ */
14
+ acceptDeps(): never
15
+
16
+ dispose(cb: (data: any) => void): void
17
+ decline(): void
18
+ invalidate(): void
19
+
20
+ on<T extends string>(
21
+ event: T,
22
+ cb: (payload: InferCustomEventPayload<T>) => void
23
+ ): void
24
+ send<T extends string>(event: T, data?: InferCustomEventPayload<T>): void
25
+ }
@@ -20,46 +20,7 @@ interface GlobOptions {
20
20
  interface ImportMeta {
21
21
  url: string
22
22
 
23
- readonly hot?: {
24
- readonly data: any
25
-
26
- accept(): void
27
- accept(cb: (mod: any) => void): void
28
- accept(dep: string, cb: (mod: any) => void): void
29
- accept(deps: readonly string[], cb: (mods: any[]) => void): void
30
-
31
- /**
32
- * @deprecated
33
- */
34
- acceptDeps(): never
35
-
36
- dispose(cb: (data: any) => void): void
37
- decline(): void
38
- invalidate(): void
39
-
40
- on: {
41
- (
42
- event: 'vite:beforeUpdate',
43
- cb: (payload: import('./hmrPayload').UpdatePayload) => void
44
- ): void
45
- (
46
- event: 'vite:beforePrune',
47
- cb: (payload: import('./hmrPayload').PrunePayload) => void
48
- ): void
49
- (
50
- event: 'vite:beforeFullReload',
51
- cb: (payload: import('./hmrPayload').FullReloadPayload) => void
52
- ): void
53
- (
54
- event: 'vite:error',
55
- cb: (payload: import('./hmrPayload').ErrorPayload) => void
56
- ): void
57
- <T extends string>(
58
- event: import('./customEvent').CustomEventName<T>,
59
- cb: (data: any) => void
60
- ): void
61
- }
62
- }
23
+ readonly hot?: import('./hot').ViteHotContext
63
24
 
64
25
  readonly env: ImportMetaEnv
65
26