Skip to content

Commit

Permalink
Merge pull request #118 from teolag/master
Browse files Browse the repository at this point in the history
fix(project): update interface
  • Loading branch information
AnthonyNahas authored Nov 26, 2019
2 parents 51b38b9 + a8d2964 commit a0f9e1c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/module/interfaces/ngx-linkifyjs.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,15 @@ export interface NgxLinkifyOptions {
nl2br?: boolean,
tagName?: string,
target?: { url: string },
validate?: boolean,
validate?: NgxLinkifyOptionsValidator,
format?(value: any, type: any): any,
formatHref?(href: any, type: any): any,
}

export type NgxLinkifyOptionsValidator = boolean | validatorFunction | validatorObject
type validatorFunction = (value: string, type?: "url" | "email") => boolean
type validatorTypeFunction = (value: string) => boolean
interface validatorObject {
url?: validatorTypeFunction
email?: validatorTypeFunction
}

0 comments on commit a0f9e1c

Please sign in to comment.