bug(CdkObserveContent): Incorrect typing for CdkObserveContent's [debounce] property - components


Input debounce of CdkObserveContent directive has type number, but the compiler hint property ngAcceptInputType_debounce is incorrectly declared as BooleanInput (instead of NumberInput ?).

Hence, Angular compiler complains when strictTemplates option is enabled.

debounce input declaration : https://github.com/angular/components/blob/43997571da4d599815d8bc4bb366f398f8652db7/src/cdk/observers/observe-content.ts#L160

Static input type declaration : https://github.com/angular/components/blob/43997571da4d599815d8bc4bb366f398f8652db7/src/cdk/observers/observe-content.ts#L203

Expected Behavior

Angular compiler does not complain about debounce property of CdkObserveContent when a number is assigned to it.

Actual Behavior

Angular compiler reports an error when a number is bound to debounce property of CdkObserveContent.


  • Angular: 10.0.14
  • CDK/Material: 10.1.3
  • Browser(s): Chrome latest
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows 10
Asked Oct 02 '21 17:10
avatar EmmanuelRoux

1 Answer:

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Answered Jan 03 '21 at 00:21
avatar  of angular-automatic-lock-bot[bot]