Debian Codegraph @

node/autolinker/dist/es2015/matcher/hashtag-matcher.d.ts

raw
1 import { Matcher, MatcherConfig } from './matcher';
2 import { Match } from '../match/match';
3 /**
4 * @class Autolinker.matcher.Hashtag
5 * @extends Autolinker.matcher.Matcher
6 *
7 * Matcher to find HashtagMatch matches in an input string.
8 */
9 export declare class HashtagMatcher extends Matcher {
10 /**
11 * @cfg {String} service
12 *
13 * A string for the service name to have hashtags (ex: "#myHashtag")
14 * auto-linked to. The currently-supported values are:
15 *
16 * - 'twitter'
17 * - 'facebook'
18 * - 'instagram'
19 * - 'tiktok'
20 */
21 protected readonly serviceName: HashtagService;
22 /**
23 * @method constructor
24 * @param {Object} cfg The configuration properties for the Match instance,
25 * specified in an Object (map).
26 */
27 constructor(cfg: HashtagMatcherConfig);
28 /**
29 * @inheritdoc
30 */
31 parseMatches(text: string): Match[];
32 }
33 export interface HashtagMatcherConfig extends MatcherConfig {
34 serviceName: HashtagService;
35 }
36 export declare type HashtagService = 'twitter' | 'facebook' | 'instagram' | 'tiktok';
37 export declare type HashtagServices = HashtagService;
38 export declare const hashtagServices: HashtagService[];