Skip to content

Commit

Permalink
chore: updated notes on improving typing
Browse files Browse the repository at this point in the history
  • Loading branch information
jd-solanki committed Dec 26, 2022
1 parent 2fb3963 commit 5717491
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/anu-vue/src/components/data-table/ADataTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ defineOptions({
name: 'ADataTable',
})
// TODO: https://twitter.com/mattpocockuk/status/1606656367078539264
const _tableProps = reactivePick(props, Object.keys(tableProps).filter(k => !['rows', 'cols'].includes(k)) as Array<keyof typeof tableProps>)
const _rows = ref<Record<string, unknown>[]>(typeof props.rows !== 'function' ? props.rows : [])
Expand Down
1 change: 0 additions & 1 deletion packages/anu-vue/src/components/menu/AMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ if (props.modelValue === undefined) {
})
}
else {
console.log('click...')
useEventListener(refReference, 'click', toggleAlertVisibility)
if (props.persist !== true) {
Expand Down
3 changes: 3 additions & 0 deletions packages/anu-vue/src/composables/useLayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ export interface LayerProps {
states: boolean
}

// Thanks: https://youtu.be/a_m7jxrTlaw
// type LooseAutocomplete<T extends string> = T | Omit<string, T>

export const useProps = (propOverrides?: Partial<ComponentObjectPropsOptions>) => {
let props = {
/**
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"resolveJsonModule": true,
"skipDefaultLibCheck": true,
"skipLibCheck": true,
"noUncheckedIndexedAccess": true,
"jsx": "preserve",
"types": [
"node"
Expand Down

0 comments on commit 5717491

Please sign in to comment.