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

Bind context functions #23

Closed
wants to merge 5 commits into from
Closed

Bind context functions #23

wants to merge 5 commits into from

Conversation

zhirafovod
Copy link
Member

Description

Bind context function to TemplateProcessor instance, so they can access template processor methods, like setData.

Type of Change

  • Bug Fix
  • New Feature
  • Breaking Change
  • Refactor
  • Documentation
  • Other (please describe)

Checklist

  • I have read the contributing guidelines
  • Existing issues have been referenced (where applicable)
  • I have verified this change is not present in other open pull requests
  • Functionality is documented
  • All code style checks pass
  • New code contribution is covered by automated tests
  • All new and existing tests pass

@zhirafovod zhirafovod requested a review from a team as a code owner November 16, 2023 00:07
src/TemplateProcessor.ts Outdated Show resolved Hide resolved
@@ -179,7 +181,7 @@ export default class TemplateProcessor {
this.changeCallbacks = new Map();
}

private setupContext(context: {}) {
private setupContext(context: {}): void {
this.context = merge(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return merged value. Don't assign to this.context!

@zhirafovod
Copy link
Member Author

After discussions, this approach was found flawed and replaced with #24

@zhirafovod zhirafovod closed this Nov 16, 2023
@zhirafovod zhirafovod deleted the bind_context_functions branch November 16, 2023 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants