add hw2
This commit is contained in:
34
node_modules/@iconify/utils/lib/emoji/replace/find.d.ts
generated
vendored
Normal file
34
node_modules/@iconify/utils/lib/emoji/replace/find.d.ts
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* Create regular expression instance
|
||||
*/
|
||||
declare function createEmojiRegExp(regexp: string): RegExp;
|
||||
/**
|
||||
* Match
|
||||
*/
|
||||
interface EmojiRegexMatch {
|
||||
match: string;
|
||||
sequence: number[];
|
||||
keyword: string;
|
||||
regexp: number;
|
||||
}
|
||||
/**
|
||||
* Add prev/next
|
||||
*/
|
||||
interface PrevMatch {
|
||||
match: EmojiRegexMatch;
|
||||
prev: string;
|
||||
}
|
||||
interface PrevNextMatch extends PrevMatch {
|
||||
next: string;
|
||||
}
|
||||
/**
|
||||
* Find emojis in text
|
||||
*
|
||||
* Returns only one entry per match
|
||||
*/
|
||||
declare function getEmojiMatchesInText(regexp: string | RegExp | (string | RegExp)[], content: string): EmojiRegexMatch[];
|
||||
/**
|
||||
* Sort emojis, get prev and next text
|
||||
*/
|
||||
declare function sortEmojiMatchesInText(content: string, matches: EmojiRegexMatch[]): PrevNextMatch[];
|
||||
export { EmojiRegexMatch, createEmojiRegExp, getEmojiMatchesInText, sortEmojiMatchesInText };
|
||||
Reference in New Issue
Block a user