Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add source location to HelperOptions #1726

Open
karlvr opened this issue Nov 21, 2020 · 0 comments
Open

Add source location to HelperOptions #1726

karlvr opened this issue Nov 21, 2020 · 0 comments
Labels

Comments

@karlvr
Copy link

karlvr commented Nov 21, 2020

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants