You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I have an interface with a default interface method which is a property with a getter body defined in the interface definition.
I construct a concrete class derived from the interface and I pass it to the handlebars template as the context parameter (data parameter is null). The type of the context parameter is System.Object.
Handlebars doesn't seem to evaluate the default interface method, but it does for properties defined in the derived class.
Describe the solution you'd like
Can a new option be added to the handlebars environment configuration, so that default interface methods are included?
Describe alternatives you've considered
I don't want to write an explicit implementation of each property in each derived class because it wouldn't be DRY.
Is your feature request supported by Handlebarsjs? Please provide details.
N/A
But probably not possible because IHandlebars.Compile returns HandlebarsTemplate<object, object> and we cannot specify the generic type argument for TContext.
Uh oh!
There was an error while loading. Please reload this page.
Is your feature request related to a problem? Please describe.
I have an interface with a default interface method which is a property with a getter body defined in the interface definition.
I construct a concrete class derived from the interface and I pass it to the handlebars template as the context parameter (data parameter is null). The type of the context parameter is
System.Object
.Handlebars doesn't seem to evaluate the default interface method, but it does for properties defined in the derived class.
Describe the solution you'd like
Can a new option be added to the handlebars environment configuration, so that default interface methods are included?
Describe alternatives you've considered
I don't want to write an explicit implementation of each property in each derived class because it wouldn't be DRY.
Is your feature request supported by Handlebarsjs? Please provide details.
N/A
Additional context
Template:
C#:
The text was updated successfully, but these errors were encountered: