docs: improve glossary for entry-point#29433
Conversation
|
Had a bit of a debate on what to call the string 'XXX' that goes in the import statement |
|
|
||
| Within Angular, use [NgModules](guide/glossary#ngmodule) to make public parts available for import by other NgModules. | ||
|
|
||
| A JavaScript module(guide/glossary#module) that is indended to be imported by a user of [a npm package](guide/npm-packages). Usually, it simply reexports symbols from other internal modules. [A npm package](guide/npm-packages) can contain multiple entry-points. For example, the `@angular/core` package has two entry-point modules, which can be imported using the module names - `@angular/core` and `@angular/core/testing`. |
There was a problem hiding this comment.
we might also mention that the first one is the "primary entry-point" and the /testing is a "secondary entry-point".
a package can one only zero (unusual) to one primary entry-points, and zero (common) to N secondary entry-points.
There was a problem hiding this comment.
How can a consumer see the - 'primary', 'secondary' distinction? Is in the package.json?
Also is there a system to prevent imports from non-entry-point modules?
There was a problem hiding this comment.
Copy-edit:
A JavaScript module(guide/glossary#module) intended for import by a user of an npm package. An entry-point module typically re-exports symbols from other internal modules. A package can contain multiple entry-points. For example, the @angular/core package has two entry-point modules, which can be imported using the module names @angular/core and @angular/core/testing.
There was a problem hiding this comment.
copy-edit done. Didn't add 'primary', 'secondary', because I think it needs more clarification.
|
|
||
| Within Angular, use [NgModules](guide/glossary#ngmodule) to make public parts available for import by other NgModules. | ||
|
|
||
| A JavaScript module(guide/glossary#module) that is indended to be imported by a user of [a npm package](guide/npm-packages). Usually, it simply reexports symbols from other internal modules. [A npm package](guide/npm-packages) can contain multiple entry-points. For example, the `@angular/core` package has two entry-point modules, which can be imported using the module names - `@angular/core` and `@angular/core/testing`. |
There was a problem hiding this comment.
you might also want to mention that the thing you import from a module/entry-point is a symbol and link to a definition of that (add one in this PR if a definition doesn't exist)
There was a problem hiding this comment.
I am afraid that leads into a rabbit hole of JavaScript semantics - for one import {A, B} from ... imports multiple symbols. Can we expect basic ES modules knowledge?
There was a problem hiding this comment.
Perhaps:
The import operation results in a Symbol value for each item imported from the entry-point module.
There was a problem hiding this comment.
Unless I am mistaked, ES6 Symbols (https://developer.mozilla.org/en-US/docs/Glossary/Symbol) have nothing to do with ES6 Module names, which is another good reason not to use the word symbol when talking about modules.
We can standardize on "module name" and remove references to "module id" if we can validate that also one more place uses that terminology - e.g. TypeScript. I think we use |
|
@jbogarthyde : Hi. As docs lead for the glossary work, I just wanted to make sure you have a chance to see this. Also, please help shepherd this through the process as needed. Thanks! |
|
|
||
| Within Angular, use [NgModules](guide/glossary#ngmodule) to make public parts available for import by other NgModules. | ||
|
|
||
| A JavaScript module(guide/glossary#module) that is indended to be imported by a user of [a npm package](guide/npm-packages). Usually, it simply reexports symbols from other internal modules. [A npm package](guide/npm-packages) can contain multiple entry-points. For example, the `@angular/core` package has two entry-point modules, which can be imported using the module names - `@angular/core` and `@angular/core/testing`. |
There was a problem hiding this comment.
Copy-edit:
A JavaScript module(guide/glossary#module) intended for import by a user of an npm package. An entry-point module typically re-exports symbols from other internal modules. A package can contain multiple entry-points. For example, the @angular/core package has two entry-point modules, which can be imported using the module names @angular/core and @angular/core/testing.
|
|
||
| Within Angular, use [NgModules](guide/glossary#ngmodule) to make public parts available for import by other NgModules. | ||
|
|
||
| A JavaScript module(guide/glossary#module) that is indended to be imported by a user of [a npm package](guide/npm-packages). Usually, it simply reexports symbols from other internal modules. [A npm package](guide/npm-packages) can contain multiple entry-points. For example, the `@angular/core` package has two entry-point modules, which can be imported using the module names - `@angular/core` and `@angular/core/testing`. |
There was a problem hiding this comment.
Perhaps:
The import operation results in a Symbol value for each item imported from the entry-point module.
|
@rkirov will you rebase on master? |
jbogarthyde
left a comment
There was a problem hiding this comment.
Please make the copy-edit changes.
639eef1 to
1551920
Compare
|
Rebased and added copy-edits. |
There was a problem hiding this comment.
entry-points -> entry points
(hyphen only when used as an adjective)
1551920 to
ad66716
Compare
jbogarthyde
left a comment
There was a problem hiding this comment.
One of the typos still there, sorry.
There was a problem hiding this comment.
Still not corrected -- "indented" -> "intended"
There was a problem hiding this comment.
lol, fixed. Thanks for being thorough.
ad66716 to
8a68ec0
Compare
|
Apparently failing because it doesn't come from a forked repo. Please help. |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |


PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?