@globalbrain/sefirot
Advanced tools
Comparing version 0.41.0 to 0.42.0
@@ -0,1 +1,7 @@ | ||
# [0.42.0](https://github.com/globalbrain/sefirot/compare/v0.41.0...v0.42.0) (2021-02-26) | ||
### Features | ||
* typescript remediation, few new features and bug fixes ([#42](https://github.com/globalbrain/sefirot/issues/42)) ([4aa4e4c](https://github.com/globalbrain/sefirot/commit/4aa4e4c9e607d3f800cebc9512e8a1428a08bd69)) | ||
# [0.41.0](https://github.com/globalbrain/sefirot/compare/v0.40.0...v0.41.0) (2021-02-25) | ||
@@ -2,0 +8,0 @@ |
@@ -1,14 +0,20 @@ | ||
import { getCurrentInstance } from '@vue/composition-api' | ||
import { computed, ComputedRef, getCurrentInstance } from '@vue/composition-api' | ||
import VueRouter, { Route } from 'vue-router' | ||
export function useRouter() { | ||
const vm = getCurrentInstance()?.proxy as any | ||
export function useRouter(): VueRouter { | ||
const { proxy } = getCurrentInstance()! | ||
return vm.$router as VueRouter | ||
return proxy.$router | ||
} | ||
export function useRoute() { | ||
const vm = getCurrentInstance()?.proxy as any | ||
export function useRoute(): ComputedRef<Route> { | ||
const { proxy } = getCurrentInstance()! | ||
return vm.$route as Route | ||
return computed(() => proxy.$route) | ||
} | ||
export function useParams(): ComputedRef<Record<string, string>> { | ||
const { proxy } = getCurrentInstance()! | ||
return computed(() => proxy.$route.params) | ||
} |
import { getCurrentInstance } from '@vue/composition-api' | ||
import { Store } from 'vuex' | ||
import { State } from '../store/Sefirot' | ||
export function useStore() { | ||
const vm = getCurrentInstance()?.proxy as any | ||
export function useStore(): Store<State> { | ||
const { proxy } = getCurrentInstance()! | ||
return vm.$store as Store<any> | ||
return proxy.$store | ||
} |
@@ -18,3 +18,3 @@ import { ResizeObserver } from '@juggle/resize-observer' | ||
onMounted(() => { ro.observe(target.value as HTMLElement) }) | ||
onMounted(() => { ro.observe(target.value!) }) | ||
onUnmounted(() => { ro.disconnect() }) | ||
@@ -21,0 +21,0 @@ |
@@ -6,12 +6,12 @@ export { default as isEqual } from 'lodash-es/isEqual' | ||
export function isNullish(value: any): value is undefined | null { | ||
export function isNullish(value: unknown): value is undefined | null { | ||
return value === null || value === undefined | ||
} | ||
export function isString(value: any): value is string { | ||
export function isString(value: unknown): value is string { | ||
return typeof value === 'string' | ||
} | ||
export function isArray(value: any): value is any[] { | ||
export function isArray(value: unknown): value is unknown[] { | ||
return Array.isArray(value) | ||
} |
export type Values<T> = T[keyof T] | ||
export type OmitType<T> = Omit<T, 'type'> | ||
export type SyntheticEvent<E extends Event, T extends Element> = E & { target: T } | ||
export type SyntheticInputEvent<T extends Element = HTMLInputElement> = SyntheticEvent<InputEvent, T> | ||
export type SyntheticMouseEvent<T extends Element = HTMLElement> = SyntheticEvent<MouseEvent, T> |
{ | ||
"name": "@globalbrain/sefirot", | ||
"version": "0.41.0", | ||
"version": "0.42.0", | ||
"description": "Vue Components for Global Brain Design System.", | ||
@@ -5,0 +5,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
274947
190
1735