When the noPropertyAccessFromIndexSignature TypeScript compiler option is enabled and a template attempts a property access that fails this check, the error message is misleading.
error TS4111: Property 'foo' comes from an index signature, so it must be accessed with ['foo'].
It is not possible to write {{record['foo']}} in a handlebars template because this is not valid syntax, so the error message should be rewritten to suggest the {{get}} helper instead.
When the
noPropertyAccessFromIndexSignature
TypeScript compiler option is enabled and a template attempts a property access that fails this check, the error message is misleading.Example:
Error message:
It is not possible to write
{{record['foo']}}
in a handlebars template because this is not valid syntax, so the error message should be rewritten to suggest the{{get}}
helper instead.