Skip to content

Conversation

rileyajones
Copy link
Contributor

Motivation for features / changes

See #6882 for an explanation as to why these changes are needed.
That PR was opened by an internal contributor who was having issues fixing the lint errors the encountered.

frost-cy and others added 3 commits July 17, 2024 12:19
…ed in the constructor

When public class fields are enabled, such cases throw a TS error similar to this.

```
third_party/javascript/angular_components/src/cdk/platform/platform.ts:37:29 - error TS2729: Property '_platformId' is used before its initialization.

37   isBrowser: boolean = this._platformId
                               ~~~~~~~~~~~

  third_party/javascript/angular_components/src/cdk/platform/platform.ts:87:15
    87   constructor(@Inject(PLATFORM_ID) private _platformId: Object) {}
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    '_platformId' is declared here.
```

This error is fixed by moving the initializer of such class members into the constructor.

This is a no-op change 

See go/lsc-fix-properties-used-before-initialization
@rileyajones rileyajones merged commit 858a951 into tensorflow:master Oct 8, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants