From 45861c096c66b0629983505bcd821e17a3f6ab2f Mon Sep 17 00:00:00 2001 From: Edward Faulkner Date: Wed, 9 Feb 2022 11:08:54 -0500 Subject: [PATCH] Update error message instructions Since Ember 3.25 it's unnecessary to pass a helper or modifier class to the corresponding template keyword before you can use them. They are first-class values that can be used directly. This updates the error message to stop suggesting the now-unnecessary use of the helper and modifier keywords. --- .../glimmer/lib/helpers/-disallow-dynamic-resolution.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@ember/-internals/glimmer/lib/helpers/-disallow-dynamic-resolution.ts b/packages/@ember/-internals/glimmer/lib/helpers/-disallow-dynamic-resolution.ts index d645d98ddd8..ae49fb96441 100644 --- a/packages/@ember/-internals/glimmer/lib/helpers/-disallow-dynamic-resolution.ts +++ b/packages/@ember/-internals/glimmer/lib/helpers/-disallow-dynamic-resolution.ts @@ -46,7 +46,7 @@ export default internalHelper(({ positional, named }: CapturedArguments) => { `(You specified \`(${type} ${original})\` and \`${original}\` evaluated into "${nameOrValue}".) ` + `This ensures we can statically analyze the template and determine which ${type}s are used. ` + `If the ${type} name is always the same, use a string literal instead, i.e. \`(${type} "${nameOrValue}")\`. ` + - `Otherwise, import the ${type}s into JavaScript and pass them to the ${type} keyword. ` + + `Otherwise, import the ${type}s into JavaScript and pass them directly. ` + 'See https://github.com/emberjs/rfcs/blob/master/text/0496-handlebars-strict-mode.md#4-no-dynamic-resolution for details. ' + loc, typeof nameOrValue !== 'string'