Skip to content

Declare @action methods as arrow functions - #208

Merged
NullVoxPopuli merged 2 commits into
universal-ember:mainfrom
johanrd:bound-column-methods
Sep 23, 2026
Merged

NullVoxPopuli merged 2 commits into
universal-ember:mainfrom
johanrd:bound-column-methods

Conversation

@johanrd

@johanrd johanrd commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

@action binds these methods, but their types say "method", so typescript-eslint's unbound-method reports every template use, like {{column.getValueForRow row}} or {{on 'click' row.handleClick}}. As arrow functions, the types say they are bound.

All 24 in the library are converted. Only ColumnOrder is exported as a class, and nothing in the library subclasses it.

One extra change: ColumnReordering's columnOrder field read this.save before save was initialized (TS2729). It now calls it lazily, like read.

CI fails because of #209, merge that first

Cowritten by Claude

@johanrd johanrd changed the title Declare the bound Column and Row methods as arrow functions Declare @action methods as arrow functions Sep 23, 2026
@action already bound them, but their types said method, so
typescript-eslint's unbound-method flags {{column.getValueForRow row}}.
ColumnReordering's columnOrder field reads save before it is
initialized, so it now calls it lazily, like read.
@johanrd
johanrd force-pushed the bound-column-methods branch from 47f7709 to d183f6b Compare September 23, 2026 18:57
@NullVoxPopuli NullVoxPopuli added the enhancement New feature or request label Sep 23, 2026
@NullVoxPopuli
NullVoxPopuli merged commit 1bd488b into universal-ember:main Sep 23, 2026
17 checks passed
@github-actions github-actions Bot mentioned this pull request Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants