You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
602 B
17 lines
602 B
|
2 years ago
|
import { EmojiRegexMatch } from './find.js';
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Callback for replacing emoji in text
|
||
|
|
*
|
||
|
|
* Returns text to replace emoji with, undefined to skip replacement
|
||
|
|
*/
|
||
|
|
type FindAndReplaceEmojisInTextCallback = (match: EmojiRegexMatch, prev: string) => string | undefined;
|
||
|
|
/**
|
||
|
|
* Find and replace emojis in text
|
||
|
|
*
|
||
|
|
* Returns null if nothing was replaced
|
||
|
|
*/
|
||
|
|
declare function findAndReplaceEmojisInText(regexp: string | RegExp | (string | RegExp)[], content: string, callback: FindAndReplaceEmojisInTextCallback): string | null;
|
||
|
|
|
||
|
|
export { FindAndReplaceEmojisInTextCallback, findAndReplaceEmojisInText };
|