Skip to content

bug(CdkObserveContent): Incorrect typing for CdkObserveContent's [debounce] property #21101

Description

@EmmanuelRoux

Reproduction

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 :

set debounce(value: number) {

Static input type declaration :

static ngAcceptInputType_debounce: BooleanInput;

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.

Environment

  • Angular: 10.0.14
  • CDK/Material: 10.1.3
  • Browser(s): Chrome latest
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows 10

Metadata

Metadata

Assignees

Labels

P4A relatively minor issue that is not relevant to core functionsarea: cdk/observers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions