-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
I would like make a final appeal to include generic support to nostrify NostrEvent.
Continuation of: nbd-wtf/nostr-tools#448
If you know you don't want that you can say just no and ok,
but here are advantages by including this in your library:
- default value as number make it retrocompatible to NostrEvent with no generic, no old software will feel the changes;
- isKind() was just included to nostr-tools and as I demonstrated it makes the guard type cast except for switch case;
- this pr Suggestion: export kinds as named types nbd-wtf/nostr-tools#447 also included use of kinds as a typescript type, so it's possible use like this:
NostrEvent<ShortText>
- while this code Suggestion: export kinds as named types nbd-wtf/nostr-tools#447 is not published in npm I'm doing this:
NostrEvent & { kind: typeof kinds.ShortText }
, a complex representation that will be common used to define kind validated events, nostrify can offer a simple symbolNostrEvent<ShortText>
- NostrEvent is equal NostrEvent from nostr-tools but with docs, this will make it a best version for use to me.
So, no?
Metadata
Metadata
Assignees
Labels
No labels