refactor(forms): drop CALL_SET_DISABLED_STATE name in production (#59430)

In this commit, we drop the `CALL_SET_DISABLED_STATE` injection token name in production.

PR Close #59430
This commit is contained in:
arturovt 2025-01-08 19:45:59 +02:00 committed by kirjs
parent e689aaed30
commit 854a5616bf

View file

@ -31,10 +31,13 @@ import {AsyncValidatorFn, Validator, ValidatorFn} from './validators';
*
* @see {@link FormsModule#withconfig}
*/
export const CALL_SET_DISABLED_STATE = new InjectionToken('CallSetDisabledState', {
providedIn: 'root',
factory: () => setDisabledStateDefault,
});
export const CALL_SET_DISABLED_STATE = new InjectionToken(
typeof ngDevMode === 'undefined' || ngDevMode ? 'CallSetDisabledState' : '',
{
providedIn: 'root',
factory: () => setDisabledStateDefault,
},
);
/**
* The type for CALL_SET_DISABLED_STATE. If `always`, then ControlValueAccessor will always call