Skip to content

Commit

Permalink
chore: fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
KermanX committed Aug 15, 2024
1 parent d565429 commit e270971
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions packages/core/src/composables/useAbsolutePath.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { asAbsolutePath } from '../utils/asAbsolutePath'
* @category utilities
* @reactive `ExtensionContext.asAbsolutePath`
*/
export function useAbsolutePath(relativePath: MaybeRefOrGetter<string>, slient: true): ComputedRef<string | undefined>
export function useAbsolutePath(relativePath: MaybeRefOrGetter<string>, slient?: false): ComputedRef<string>
export function useAbsolutePath(relativePath: MaybeRefOrGetter<string>, slient = false) {
return computed(() => asAbsolutePath(toValue(relativePath), slient))
export function useAbsolutePath(relativePath: MaybeRefOrGetter<string>, silent: true): ComputedRef<string | undefined>
export function useAbsolutePath(relativePath: MaybeRefOrGetter<string>, silent?: false): ComputedRef<string>
export function useAbsolutePath(relativePath: MaybeRefOrGetter<string>, silent = false) {
return computed(() => asAbsolutePath(toValue(relativePath), silent))
}
2 changes: 1 addition & 1 deletion packages/core/src/composables/useViewVisibility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ export function useViewVisibility(view: MaybeNullableRefOrGetter<ViewWithVisibil

watchEffect(update)

// Visiblility should be readonly
// Visibility should be readonly
return computed(() => !!visible.value)
}
8 changes: 4 additions & 4 deletions packages/core/src/utils/asAbsolutePath.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import { extensionContext } from '../utils'
/**
* A shorthand for `vscode::ExtensionContext.asAbsolutePath`
*/
export function asAbsolutePath(relativePath: string, slient?: false): string
export function asAbsolutePath(relativePath: string, slient?: boolean): string | undefined
export function asAbsolutePath(relativePath: string, slient = false) {
export function asAbsolutePath(relativePath: string, silent?: false): string
export function asAbsolutePath(relativePath: string, silent?: boolean): string | undefined
export function asAbsolutePath(relativePath: string, silent = false) {
const extCtx = extensionContext.value
if (!extCtx && !slient)
if (!extCtx && !silent)
throw new Error('Cannot get absolute path because the extension is not activated yet')
return extCtx?.asAbsolutePath(relativePath)
}

0 comments on commit e270971

Please sign in to comment.