Skip to content

Add source location to HelperOptions #1726

@karlvr

Description

@karlvr

The options object passed to a helper contains more information than in the type HelperOptions, specifically name, loc and lookupProperty. It's easy enough to add these to the type definition:

	name: string
	loc: {
		start: hbs.AST.Position
		end: hbs.AST.Position
	}
	lookupProperty: (object: unknown, propertyName: string) => unknown

But the loc property isn't a full SourceLocation. It's missing the source: string property, which I hope will identify the filename of the current template. It would be fantastic to add that property so that a helperMissing helper can produce more useful output!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions