Skip to content

Commit

Permalink
fix(project): update interface
Browse files Browse the repository at this point in the history
  • Loading branch information
Teodor Lagerqvist committed Oct 29, 2019
1 parent 254d6d6 commit a8d2964
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 a8d2964

Please sign in to comment.