=====Interface===== ====Fonctions==== ===Implémenter une fonction qui respecte une interface=== Exemple avec ''ValidatorFn''. export declare interface ValidatorFn { (control: AbstractControl): ValidationErrors | null; } validNumber(): ValidatorFn { return (control: AbstractControl): ValidationErrors | null => { return ...; }; } [[https://indepth.dev/posts/1319/the-best-way-to-implement-custom-validators|The best way to implement custom validators]] {{ :lang:typescript:classe:the_best_way_to_implement_custom_validators_-_angular_indepth_2021-09-24_05_10_14_.html |Archive du 03/09/2020 le 24/09/2021}}