Skip to content

[BUGFIX] enable plain method calling from templates (no explicit binding required -- follows JS semantics) #21469

Open
NullVoxPopuli wants to merge 1 commit into
mainfrom
nvp/fix-this-binding-for-real
Open

[BUGFIX] enable plain method calling from templates (no explicit binding required -- follows JS semantics) #21469
NullVoxPopuli wants to merge 1 commit into
mainfrom
nvp/fix-this-binding-for-real

Conversation

assert.equal(this.stashedFn(), 'arg1: foo, arg2: bar');
}

'@test there is no `this` context within the callback'(assert) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

a change in behavior, but for the better -- I dare say: a bugfix

@github-actions

Copy link
Copy Markdown
Contributor

📊 Size report

Tarball size1.2 MB1.2 MB

dist/dev   0.07%↑

File Before (Size / Brotli) After (Size / Brotli)
./packages/shared-chunks/api-{hash}.js 25.9 kB / 5.7 kB -61.1%↓10.1 kB / -60.5%↓2.3 kB
./packages/shared-chunks/hash-{hash}.js 6 kB / 1.9 kB 5%↑6.3 kB / 4%↑2 kB
./packages/shared-chunks/on-{hash}.js 8.5 kB / 2.4 kB 5%↑8.9 kB / 5%↑2.5 kB
./packages/shared-chunks/reference-{hash}.js 4.9 kB / 1.3 kB 15%↑5.6 kB / 21%↑1.5 kB
Total (Includes all files) 2.1 MB / 492.7 kB 0.07%↑2.1 MB / 0.1%↑493.1 kB

dist/prod   0.08%↑

File Before (Size / Brotli) After (Size / Brotli)
./packages/shared-chunks/hash-{hash}.js 5.7 kB / 1.8 kB 5%↑6 kB / 5%↑1.9 kB
./packages/shared-chunks/on-{hash}.js 6.8 kB / 1.9 kB 6%↑7.2 kB / 7%↑2.1 kB
./packages/shared-chunks/reference-{hash}.js 4.3 kB / 1.2 kB 17%↑5 kB / 24%↑1.4 kB
Total (Includes all files) 1.9 MB / 450.7 kB 0.08%↑1.9 MB / 0.09%↑451.1 kB

smoke-tests/v2-app-template/dist   0.05%↑

File Before (Size / Brotli) After (Size / Brotli)
./assets/main-{hash}.js 312.6 kB / 83.8 kB 0.05%↑312.8 kB / 0.08%↑83.8 kB
Total (Includes all files) 348.1 kB / 94.7 kB 0.05%↑348.2 kB / 0.06%↑94.7 kB

smoke-tests/v2-app-hello-world-template/dist   0.09%↑

File Before (Size / Brotli) After (Size / Brotli)
./assets/main-{hash}.js 159 kB / 43.7 kB 0.09%↑159.2 kB / 0.2%↑43.8 kB
Total (Includes all files) 159.4 kB / 43.9 kB 0.09%↑159.5 kB / 0.2%↑43.9 kB

🤖 This report was automatically generated by wyvox/pkg-size

@NullVoxPopuli NullVoxPopuli changed the title fix plain method calling [BUGFIX] enable plain method calling from templates Jun 12, 2026
@NullVoxPopuli NullVoxPopuli changed the title [BUGFIX] enable plain method calling from templates [BUGFIX] enable plain method calling from templates (no explicit binding required -- follows JS semantics) Jun 12, 2026
@NullVoxPopuli NullVoxPopuli marked this pull request as ready for review June 12, 2026 20:35

// eslint-disable-next-line @typescript-eslint/no-unsafe-return -- @fixme
return (fn as AnyFn).call(context, ...args, ...invocationArgs);
return (fn as AnyFn).call(self, ...args, ...invocationArgs);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

the actual fix is here

* The reference this one was created from via a property read (`parent.path`),
* if any. See {@linkcode parentRefFor}.
*/
public parent: Nullable<Reference> = null;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

more reference linking 🙈

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.

1 participant