Fix (most) slow types by adding explicit return types

This commit is contained in:
Alex Gleason
2024-03-06 11:47:50 -06:00
committed by fiatjaf_
parent 63ccc8b4c8
commit 9c0ade1329
12 changed files with 38 additions and 28 deletions

View File

@@ -2,7 +2,7 @@ import { decode } from './nip19.ts'
import { NOSTR_URI_REGEX, type NostrURI } from './nip21.ts'
/** Regex to find NIP-21 URIs inside event content. */
export const regex = () => new RegExp(`\\b${NOSTR_URI_REGEX.source}\\b`, 'g')
export const regex = (): RegExp => new RegExp(`\\b${NOSTR_URI_REGEX.source}\\b`, 'g')
/** Match result for a Nostr URI in event content. */
export interface NostrURIMatch extends NostrURI {