From 3dd31a475d649a5e83ee37806af688c16602e51e Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Wed, 25 Sep 2024 08:14:40 +0900 Subject: [PATCH] chore: naming --- packages/vite/src/client/client.ts | 2 +- packages/vite/src/node/ssr/runtime/serverHmrConnector.ts | 4 ++-- packages/vite/src/shared/hmr.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/vite/src/client/client.ts b/packages/vite/src/client/client.ts index 09929640adde36..5087e1f3801b48 100644 --- a/packages/vite/src/client/client.ts +++ b/packages/vite/src/client/client.ts @@ -142,7 +142,7 @@ const hmrClient = new HMRClient( }, { isReady: () => socket && socket.readyState === 1, - send: (message) => socket.send(JSON.stringify(message)), + send: (payload) => socket.send(JSON.stringify(payload)), }, async function importUpdatedModule({ acceptedPath, diff --git a/packages/vite/src/node/ssr/runtime/serverHmrConnector.ts b/packages/vite/src/node/ssr/runtime/serverHmrConnector.ts index ed823c08510aa0..45cb574214d50d 100644 --- a/packages/vite/src/node/ssr/runtime/serverHmrConnector.ts +++ b/packages/vite/src/node/ssr/runtime/serverHmrConnector.ts @@ -47,8 +47,8 @@ export class ServerHMRConnector implements ModuleRunnerHMRConnection { return this.connected } - send(message: HotPayload): void { - const payload = message as CustomPayload + send(payload_: HotPayload): void { + const payload = payload_ as CustomPayload this.hotChannel.api.innerEmitter.emit( payload.event, payload.data, diff --git a/packages/vite/src/shared/hmr.ts b/packages/vite/src/shared/hmr.ts index d4851ded7d8f3f..4d53f6d0c8ef6a 100644 --- a/packages/vite/src/shared/hmr.ts +++ b/packages/vite/src/shared/hmr.ts @@ -178,8 +178,8 @@ class HMRMessenger { private queue: HotPayload[] = [] - public send(message: HotPayload): void { - this.queue.push(message) + public send(payload: HotPayload): void { + this.queue.push(payload) this.flush() }