fix(cli): error in type assertion

This commit is contained in:
Julien Oculi 2024-04-04 17:11:32 +02:00
parent 2e4f4e0b2c
commit 3072d3af20

View file

@ -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}"`,
) )