mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
Make return value of LinkifyIt.match nullable (#29810)
This commit is contained in:
committed by
Sheetal Nandi
parent
9224cf6311
commit
0c9e5f3d40
Vendored
+1
-1
@@ -45,7 +45,7 @@ declare namespace LinkifyIt {
|
||||
|
||||
interface LinkifyIt {
|
||||
add(schema: string, rule: Rule): LinkifyIt;
|
||||
match(text: string): Match[];
|
||||
match(text: string): Match[] | null;
|
||||
normalize(raw: string): string;
|
||||
pretest(text: string): boolean;
|
||||
set(options: Options): LinkifyIt;
|
||||
|
||||
@@ -30,7 +30,9 @@ linkifier
|
||||
const matches = linkifier.match(
|
||||
"https://github.com/DefinitelyTyped/DefinitelyTyped/"
|
||||
);
|
||||
matches.forEach(({ index, lastIndex, raw, schema, text, url }) => {});
|
||||
if (matches !== null) {
|
||||
matches.forEach(({ index, lastIndex, raw, schema, text, url }) => {});
|
||||
}
|
||||
|
||||
// complex rule
|
||||
linkifier.add("@", {
|
||||
|
||||
Reference in New Issue
Block a user