fix(cli): error in type assertion
This commit is contained in:
parent
2e4f4e0b2c
commit
3072d3af20
|
@ -21,12 +21,12 @@ export class Contact {
|
||||||
|
|
||||||
const { name, address } = custom[shortName as keyof typeof custom]
|
const { name, address } = custom[shortName as keyof typeof custom]
|
||||||
|
|
||||||
if (name !== 'string') {
|
if (typeof name !== 'string') {
|
||||||
throw new SyntaxError(
|
throw new SyntaxError(
|
||||||
`missing key "name" in contact short name config for "${shortName}"`,
|
`missing key "name" in contact short name config for "${shortName}"`,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
if (address !== 'string') {
|
if (typeof address !== 'string') {
|
||||||
throw new SyntaxError(
|
throw new SyntaxError(
|
||||||
`missing key "address" in contact short name config for "${shortName}"`,
|
`missing key "address" in contact short name config for "${shortName}"`,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue