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

Adding note about syntax for top declaration when using es6 #27

Merged
merged 1 commit into from
Dec 1, 2016
Merged

Adding note about syntax for top declaration when using es6 #27

merged 1 commit into from
Dec 1, 2016

Conversation

acolchado
Copy link
Collaborator

@wruth This documentation note closes your question in issue #26 .

Copy link

@dgdblank dgdblank left a comment

Choose a reason for hiding this comment

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

Quick question about syntax.

While it is tempting to utilize the fat arrow syntax in this top declaration file like the example below, it will not be supported by spur-ioc. For more information, read issue [#26](https://github.com/opentable/spur-ioc/issues/26). Instead use the recommended approach above. There isn't a compelling reason to add that additional support. If you use this style, it will break as the report in issue #26.

```javascript
var injector = require("./injector");
Copy link

Choose a reason for hiding this comment

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

Is this supposed to be using es6 syntax? Should you be using import injector from ./injector?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Only for the function definition. Imports are not supported in most versions of node, so I kept it as close to what is supported on most versions.

Copy link

Choose a reason for hiding this comment

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

LGTM.

@acolchado acolchado merged commit 9cb94d2 into opentable:master Dec 1, 2016
@acolchado acolchado deleted the es6-note branch August 26, 2017 06:11
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