Skip to content

Pre-build-reform cleanups#20688

Merged
ef4 merged 3 commits intomainfrom
tidy
Apr 30, 2024
Merged

Pre-build-reform cleanups#20688
ef4 merged 3 commits intomainfrom
tidy

Conversation

@ef4
Copy link
Contributor

@ef4 ef4 commented Apr 30, 2024

These are three small changes extracted from #20675 for ease of review. Each commit is self-contained with its own description.

ef4 added 3 commits April 30, 2024 07:23
These unused mutable bindings produce worse build output when building Ember with rollup. And they're wordier anyway.
Depending on what build environment the test suite is using, class names could get mangled (because they're getting merged into a shared module namespace for example). This makes the tests not care.
This is arguably just cleaner style, but the reason I care in particular is that there is a bug in babel such that under certain settings this emits:

```js
class Registry {
  // ...
  set
  constructor() {
    // ...
  }
}
```

which is a syntax error because it looks like your constructor is a setter.

With `declare`, typescript completely removes the pointless runtime field initializer.
Copy link
Contributor

@NullVoxPopuli NullVoxPopuli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ef4 ef4 merged commit 12f617e into main Apr 30, 2024
@ef4 ef4 deleted the tidy branch April 30, 2024 16:26
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.

2 participants