Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typings are wrong #12

Closed
muuvmuuv opened this issue Dec 9, 2021 · 1 comment
Closed

Typings are wrong #12

muuvmuuv opened this issue Dec 9, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@muuvmuuv
Copy link

muuvmuuv commented Dec 9, 2021

Using the return type parsedVCard says I only have two prop "values" and "parameters" but actually it is returning an object of parsedVCard.

Bildschirmfoto 2021-12-09 um 09 53 28

Potential fix would be:

declare interface VCardProperty = {
  parameter: VCardParameter
  value: VCardValue
}
declare type ParsedVCard = Record<Uppercase<string>, VCardProperty>

Please note that I intentionally modified your type names a little, so these are more specific to vcard4 and not too generic. Types should also start capitalized, not to confuse with values and functions.

@kelseykm
Copy link
Owner

kelseykm commented Dec 9, 2021

Fixed
commit 75dbd23

@kelseykm kelseykm closed this as completed Dec 9, 2021
@kelseykm kelseykm added the bug Something isn't working label Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants