Skip to content

Enable --noImplicitReturns for cdk/components #16669

Closed
@rkirov

Description

@rkirov

We want to unify our compilation flags inside and outside Google for Angular projects. We found that this flag improves readability by asking you to explicitly write return undefined in the scenarios where it can happen like:

function f() {
  if (someCond()) {
     ....
     return x;
  }
}

The fix is usually to just write:

function f() {
  if (someCond()) {
     ....
     return x;
  }
  return undefined;
}

or rethink the control flow.

Metadata

Metadata

Assignees

Labels

GThis is is related to a Google internal issueP2The issue is important to a large percentage of users, with a workaroundfeatureThis issue represents a new feature or feature request rather than a bug or bug fix

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions