FormBuild is deprecated

How can I solve this problem?

Based on this thread:

the solution is changing this
{ validator: NewValidators.passwordsShouldMatch });

to this
{ validator: NewValidators.passwordsShouldMatch } as AbstractControlOptions);