chore(typescript): enhance type dafety
parent
9eb97b7a70
commit
0af915ce73
|
@ -58,7 +58,7 @@ const EXTRACTORS = {
|
|||
'SHOW DATABASES': parsed => parsed.databases,
|
||||
'SHOW FIELD KEYS': parsed => {
|
||||
const {fieldSets} = parsed
|
||||
const fieldSetsValues = Object.values(fieldSets)
|
||||
const fieldSetsValues: unknown[][] = Object.values(fieldSets)
|
||||
|
||||
return fieldSetsValues.reduce((acc, current) => [...acc, ...current], [])
|
||||
},
|
||||
|
@ -73,7 +73,7 @@ const EXTRACTORS = {
|
|||
'SHOW TAG KEYS': parsed => parsed.tagKeys,
|
||||
'SHOW TAG VALUES': parsed => {
|
||||
const {tags} = parsed
|
||||
const tagsValues = Object.values(tags)
|
||||
const tagsValues: unknown[][] = Object.values(tags)
|
||||
|
||||
return tagsValues.reduce((acc, current) => [...acc, ...current], [])
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue