From eccc9e130491141b62cb723cd56e41f0ac4a5922 Mon Sep 17 00:00:00 2001 From: Sam Van Campenhout Date: Mon, 13 Jan 2025 16:55:10 +0100 Subject: [PATCH] Remove the helper wrapper from the helper generator Plain function helpers have been supported since ember-source 4.5 so we no longer need the wrapping `helper` call. --- blueprints/helper/files/__root__/helpers/__name__.ts | 8 +++----- node-tests/fixtures/helper/helper.js | 8 +++----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/blueprints/helper/files/__root__/helpers/__name__.ts b/blueprints/helper/files/__root__/helpers/__name__.ts index 786682850a6..23c810097b8 100644 --- a/blueprints/helper/files/__root__/helpers/__name__.ts +++ b/blueprints/helper/files/__root__/helpers/__name__.ts @@ -1,5 +1,3 @@ -import { helper } from '@ember/component/helper'; - -export default helper(function <%= camelizedModuleName %>(positional /*, named*/) { - return positional; -}); +export default function <%= camelizedModuleName %>(positionalA /*, positionalB, named*/) { + return positionalA; +} diff --git a/node-tests/fixtures/helper/helper.js b/node-tests/fixtures/helper/helper.js index f9ba5222510..7f9a961da6c 100644 --- a/node-tests/fixtures/helper/helper.js +++ b/node-tests/fixtures/helper/helper.js @@ -1,5 +1,3 @@ -import { helper } from '@ember/component/helper'; - -export default helper(function fooBarBaz(positional /*, named*/) { - return positional; -}); +export default function fooBarBaz(positionalA /*, positionalB, named*/) { + return positionalA; +}