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

Confusing statement on project/external-modules.md #100

Closed
lifenautjoe opened this issue Apr 17, 2016 · 5 comments
Closed

Confusing statement on project/external-modules.md #100

lifenautjoe opened this issue Apr 17, 2016 · 5 comments
Assignees

Comments

@lifenautjoe
Copy link
Contributor

As seen here

Import type only

The following statement:

import foo = require('foo');

actually imports two things:

  • The type information from the imported file.
  • Takes are runtime dependency on the foo module.

You can pick and choose so that only the type information is loaded and no runtime dependency occurs. Before continuing you might want to recap the declaration spaces section of the book.

What does the second list item meant? Perhaps it should be

  • The runtime dependencies on the foo module

If it is what was meant with the statement, I'll submit a PR .

@basarat
Copy link
Owner

basarat commented Apr 19, 2016

Takes are runtime dependency on the foo module.

i.e. the current file cannot work unless foo is loaded first

@lifenautjoe
Copy link
Contributor Author

I believe the statement doesn't make sense grammatically, I have consulted with a few colleagues which are native english speakers and also find it confusing.

The sentence should be read as an extension of actually imports two things:, meaning read as

actually imports two things: Takes are runtime dependency on the foo module.

I believe it should still be rephrased.

@basarat
Copy link
Owner

basarat commented Apr 19, 2016

I believe it should still be rephrased.

Agreed 🌹 How about:

Actually does two things:

  • Imports the type information of the foo module.
  • Specifes a runtime dependency on the foo module.

@lifenautjoe
Copy link
Contributor Author

Way better! Make the Specifes a Specifies and good to go 😄 , should I change it or do you have time?

@basarat basarat self-assigned this Apr 19, 2016
@basarat
Copy link
Owner

basarat commented Apr 19, 2016

I'll do it and reference 🌹

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

No branches or pull requests

2 participants