Skip to content

[BUGFIX] Allow CoreObject#init to be called with no arguments - #21524

Merged
NullVoxPopuli merged 1 commit into
emberjs:mainfrom
olenderhub:fix/classic-component-init-optional-arg
Jul 26, 2026
Merged

[BUGFIX] Allow CoreObject#init to be called with no arguments#21524
NullVoxPopuli merged 1 commit into
emberjs:mainfrom
olenderhub:fix/classic-component-init-optional-arg

Conversation

@olenderhub

Copy link
Copy Markdown
Contributor

Component.init was fixed in #20492, but Controller, Route, Service, and other EmberObject subclasses still required an argument via CoreObject because a parameter typed T | undefined is still required. Make it optional so super.init() type-checks again.

Closes #20483

Component.init was fixed in emberjs#20492, but Controller, Route, Service, and
other EmberObject subclasses still required an argument via CoreObject
because a parameter typed `T | undefined` is still required. Make it
optional so `super.init()` type-checks again.

Closes emberjs#20483
@NullVoxPopuli
NullVoxPopuli merged commit 115d89b into emberjs:main Jul 26, 2026
46 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.

init in classic components takes an argument in the stable types

2 participants