mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2026-07-22 07:48:27 +00:00
declare a missing type.
This commit is contained in:
2
nip30.ts
2
nip30.ts
@@ -42,7 +42,7 @@ export function* matchAll(content: string): Iterable<CustomEmojiMatch> {
|
||||
|
||||
/** Replace all emoji shortcodes in the content. */
|
||||
export function replaceAll(content: string, replacer: (match: CustomEmoji) => string): string {
|
||||
return content.replaceAll(regex(), (shortcode, name) => {
|
||||
return content.replaceAll(regex(), (shortcode: string, name: string) => {
|
||||
return replacer({
|
||||
shortcode: shortcode as `:${string}:`,
|
||||
name,
|
||||
|
||||
Reference in New Issue
Block a user