@types/linkify-it
Advanced tools
Comparing version 2.0.2 to 2.0.3
@@ -7,45 +7,53 @@ // Type definitions for linkify-it 2.0.3 | ||
declare const LinkifyIt: { | ||
(schemas?: LinkifyIt.SchemaRules, options?: LinkifyIt.Options): LinkifyIt.LinkifyIt; | ||
new (schemas?: LinkifyIt.SchemaRules, options?: LinkifyIt.Options): LinkifyIt.LinkifyIt; | ||
( | ||
schemas?: LinkifyIt.SchemaRules | LinkifyIt.Options, | ||
options?: LinkifyIt.Options | ||
): LinkifyIt.LinkifyIt; | ||
new ( | ||
schemas?: LinkifyIt.SchemaRules | LinkifyIt.Options, | ||
options?: LinkifyIt.Options | ||
): LinkifyIt.LinkifyIt; | ||
}; | ||
declare namespace LinkifyIt { | ||
interface FullRule { | ||
validate(text: string, pos: number, self: LinkifyIt): number; | ||
normalize?(match: string): string; | ||
} | ||
type Validate = (text: string, pos: number, self: LinkifyIt) => number; | ||
type Rule = string | RegExp | FullRule; | ||
interface FullRule { | ||
validate: string | RegExp | Validate; | ||
normalize?(match: string): string; | ||
} | ||
interface SchemaRules { | ||
[schema: string]: Rule; | ||
} | ||
type Rule = string | FullRule; | ||
interface Options { | ||
fuzzyLink?: boolean; | ||
fuzzyIP?: boolean; | ||
fuzzyEmail?: boolean; | ||
} | ||
interface SchemaRules { | ||
[schema: string]: Rule; | ||
} | ||
interface Match { | ||
index: number; | ||
lastIndex: number; | ||
raw: string; | ||
schema: string; | ||
text: string; | ||
url: string; | ||
} | ||
interface Options { | ||
fuzzyLink?: boolean; | ||
fuzzyIP?: boolean; | ||
fuzzyEmail?: boolean; | ||
} | ||
interface LinkifyIt { | ||
add(schema: string, rule: Rule): LinkifyIt; | ||
match(text: string): Match[]; | ||
normalize(raw: string): string; | ||
pretest(text: string): boolean; | ||
set(options: Options): LinkifyIt; | ||
test(text: string): boolean; | ||
testSchemaAt(text: string, schemaName: string, pos: number): number; | ||
tlds(list: string | string[], keepOld?: boolean): LinkifyIt; | ||
} | ||
interface Match { | ||
index: number; | ||
lastIndex: number; | ||
raw: string; | ||
schema: string; | ||
text: string; | ||
url: string; | ||
} | ||
interface LinkifyIt { | ||
add(schema: string, rule: Rule): LinkifyIt; | ||
match(text: string): Match[]; | ||
normalize(raw: string): string; | ||
pretest(text: string): boolean; | ||
set(options: Options): LinkifyIt; | ||
test(text: string): boolean; | ||
testSchemaAt(text: string, schemaName: string, pos: number): number; | ||
tlds(list: string | string[], keepOld?: boolean): LinkifyIt; | ||
} | ||
} | ||
export = LinkifyIt; |
{ | ||
"name": "@types/linkify-it", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "TypeScript definitions for linkify-it", | ||
@@ -24,4 +24,4 @@ "license": "MIT", | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "d48b34fab691cbda7bdc703618f2a475b2ad6b8c3d3da23ff8a3aa67421c0e6c", | ||
"typesPublisherContentHash": "5c131af7c037e5ed83d6c7bb56bec7eca4f6b12cd1687dd812d4baa0a2a9e8b7", | ||
"typeScriptVersion": "2.0" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
Additional Details | ||
* Last updated: Mon, 09 Oct 2017 23:30:01 GMT | ||
* Last updated: Wed, 18 Apr 2018 19:49:48 GMT | ||
* Dependencies: none | ||
@@ -14,0 +14,0 @@ * Global values: none |
4207
49