Skip to content

Commit

Permalink
fix: typos
Browse files Browse the repository at this point in the history
  • Loading branch information
alexzhang1030 committed Apr 30, 2024
1 parent cdd7a29 commit 2c5549f
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 13 deletions.
1 change: 0 additions & 1 deletion packages/client/src/setup/unocss-runtime.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// @ts-expect-error missin types
import presetIcons from '@unocss/preset-icons/browser'
import init from '@unocss/runtime'

Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/vite-bridge/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ async function getViteHotContext() {
if (import.meta.url?.includes('chrome-extension://'))
return

const viteCLient = await getViteClient(`${location.pathname.split('/__devtools__')[0] || ''}/`.replace(/\/\//g, '/'), false)
return viteCLient?.createHotContext('/____')
const viteClient = await getViteClient(`${location.pathname.split('/__devtools__')[0] || ''}/`.replace(/\/\//g, '/'), false)
return viteClient?.createHotContext('/____')
}

export async function initViteClientHotContext() {
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools-kit/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ declare global {
var __VUE_DEVTOOLS_GLOBAL_HOOK__: DevToolsHook
var __VUE_DEVTOOLS_GLOBAL_STATE__: DevToolsState
var __VUE_DEVTOOLS_CONTEXT__: DevToolsContext
var __VUE_DEVTOOLS_NEXT_APP_RECROD_INFO__: {
var __VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__: {
id: number
appIds: Set<string>
}
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools-kit/src/compat/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export function isLegacyVueDevTools() {
return +(target.__VUE_DEVTOOLS_GLOBAL_HOOK__.devtoolsVersion?.[0] ?? 0) < 7
}

export function onLegacyDevToolsPluginApiAvailabled(cb: () => void) {
export function onLegacyDevToolsPluginApiAvailable(cb: () => void) {
if (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__) {
cb()
return
Expand Down
4 changes: 2 additions & 2 deletions packages/devtools-kit/src/core/component/state/custom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export function getSetDetails(val: Set<unknown>) {
}
}

function getCatchedGetters(store) {
function getCaughtGetters(store) {
const getters = {}

const origGetters = store.getters || {}
Expand Down Expand Up @@ -131,7 +131,7 @@ export function getStoreDetails(store) {
displayText: 'Store',
value: {
state: store.state,
getters: getCatchedGetters(store),
getters: getCaughtGetters(store),
},
fields: {
abstract: true,
Expand Down
4 changes: 2 additions & 2 deletions packages/devtools-kit/src/core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { createDevToolsHook, devtoolsHooks, hook, subscribeDevToolsHook } from '
import { DevToolsHooks } from '../types'
import { devtoolsAppRecords, devtoolsState, getDevToolsEnv } from '../state'
import { DevToolsEvents, DevToolsPluginApi, apiHooks, collectDevToolsPlugin, setupExternalPlugin } from '../api'
import { onLegacyDevToolsPluginApiAvailabled } from '../compat'
import { onLegacyDevToolsPluginApiAvailable } from '../compat'
import { createAppRecord, setActiveAppRecord } from './app-record'

export function initDevTools() {
Expand Down Expand Up @@ -35,7 +35,7 @@ export function initDevTools() {
setupExternalPlugin([pluginDescriptor, setupFn], app, api)
})

onLegacyDevToolsPluginApiAvailabled(() => {
onLegacyDevToolsPluginApiAvailable(() => {
const normalizedPluginBuffer = devtoolsState.pluginBuffer.filter(([item]) => item.id !== 'components')
normalizedPluginBuffer.forEach(([pluginDescriptor, setupFn]) => {
target.__VUE_DEVTOOLS_GLOBAL_HOOK__.emit(DevToolsHooks.SETUP_DEVTOOLS_PLUGIN, pluginDescriptor, setupFn, { target: 'legacy' })
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools-kit/src/state/app-record.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const devtoolsAppRecords = new Proxy<DevToolsAppRecords>(devtoolsState.ap
},
})

export const appRecordInfo = target.__VUE_DEVTOOLS_NEXT_APP_RECROD_INFO__ ??= {
export const appRecordInfo = target.__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__ ??= {
id: 0,
appIds: new Set<string>(),
}
6 changes: 3 additions & 3 deletions packages/overlay/src/composables/bridge.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import type { Bridge } from '@vue/devtools-core'
import { shallowRef, watchEffect } from 'vue'

type BridgeTye = InstanceType<typeof Bridge>
type BridgeType = InstanceType<typeof Bridge>

const bridgeRef = shallowRef<BridgeTye | null>(null)
const bridgeRef = shallowRef<BridgeType | null>(null)

export function registerBridge(bridge: InstanceType<typeof Bridge>) {
bridgeRef.value = bridge
}

export function waitBridgeReady() {
return new Promise<BridgeTye>((resolve) => {
return new Promise<BridgeType>((resolve) => {
if (bridgeRef.value)
resolve(bridgeRef.value)
watchEffect(() => {
Expand Down

0 comments on commit 2c5549f

Please sign in to comment.