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

Update typings for handlebars: Add options param to parse #31380

Merged

Conversation

timlindvall
Copy link
Contributor

  • Add optional options param to parse. This reflects the options param
    in the Handlebars source code. Also defines interface ParseOptions,
    which includes the options that have an effect on Handlebars parsing.
  • Fix duplicate properties in tsconfig.json.
  • Fix typo in import in handlebars-tests.ts.

Reference Source:
https://github.com/wycats/handlebars.js/blob/master/lib/handlebars/compiler/base.js#L11

Non-breaking change (new param is optional).


  • Use a meaningful title for the pull request. Include the name of the package modified.
  • Test the change in your own code. (Compile and run.)
    • Tested by patching modified types into glimmer-vm.
  • Add or edit tests to reflect the change. (Run with npm test.)
  • Follow the advice from the readme.
  • Avoid common mistakes.
  • Run npm run lint package-name (or tsc if no tslint.json is present).

If changing an existing definition:

- Add optional options param to parse. This reflects the options param
in the Handlebars source code. Also defines interface ParseOptions,
which includes the options that have an effect on Handlebars parsing.
- Fix duplicate properties in tsconfig.json.
- Fix typo in import in handlebars-tests.ts.

Reference Source:
https://github.com/wycats/handlebars.js/blob/master/lib/handlebars/compiler/base.js#L11

Non-breaking change (new param is optional).
@typescript-bot typescript-bot added this to Waiting for Reviewers in Pull Request Status Board Dec 13, 2018
@typescript-bot typescript-bot added Popular package This PR affects a popular package (as counted by NPM download counts). Awaiting reviewer feedback labels Dec 13, 2018
@typescript-bot
Copy link
Contributor

typescript-bot commented Dec 13, 2018

@zimmi88 Thank you for submitting this PR!

🔔 @borisyankov @evil-shrike - please review this PR in the next few days. Be sure to explicitly select Approve or Request Changes in the GitHub UI so I know what's going on.

If no reviewer appears after a week, a DefinitelyTyped maintainer will review the PR instead.

@typescript-bot typescript-bot moved this from Waiting for Reviewers to Check and Merge in Pull Request Status Board Dec 14, 2018
@typescript-bot typescript-bot added Owner Approved A listed owner of this package signed off on the pull request. Merge:Express and removed Awaiting reviewer feedback labels Dec 14, 2018
@typescript-bot
Copy link
Contributor

A definition owner has approved this PR ⭐️. A maintainer will merge this PR shortly. If it shouldn't be merged yet, please leave a comment saying so and we'll wait. Thank you for your contribution to DefinitelyTyped!

@stefanpenner
Copy link

LGTM

@typescript-bot typescript-bot added the Other Approved This PR was reviewed and signed-off by a community member. label Dec 18, 2018
@@ -1,6 +1,6 @@

//import Handlebars = require('handlebars');
import * as Handlerbars from 'handlebars';
import * as Handlebars from 'handlebars';
Copy link
Contributor

Choose a reason for hiding this comment

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

This typo is good evidence that handlebars should switch to the new global syntax:

``ts
export = Handlebars;
export as namespace Handlebars;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the feedback! In parallel, I've been working to have Handlebars provide its own typings as part of the package (handlebars-lang/handlebars.js#1487), so I'll look into making this change over there (likely in a follow-up PR).

@sandersn sandersn merged commit 75deea3 into DefinitelyTyped:master Dec 19, 2018
@typescript-bot typescript-bot removed this from Check and Merge in Pull Request Status Board Dec 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Other Approved This PR was reviewed and signed-off by a community member. Owner Approved A listed owner of this package signed off on the pull request. Popular package This PR affects a popular package (as counted by NPM download counts).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants