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

doc: add util.types.isModuleNamespaceObject() #20616

Closed

Conversation

devsnek
Copy link
Member

@devsnek devsnek commented May 9, 2018

Checklist

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. util Issues and PRs related to the built-in util module. labels May 9, 2018
@devsnek devsnek added the fast-track PRs that do not need to wait for 48 hours to land. label May 9, 2018
@devsnek
Copy link
Member Author

devsnek commented May 9, 2018


Returns `true` if the value is an instance of a [Module Namespace Object][].

For example:
Copy link
Member

Choose a reason for hiding this comment

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

Drop this line.

Copy link
Member Author

Choose a reason for hiding this comment

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

as much as i hate that line, every other one has that line.

Copy link
Member Author

Choose a reason for hiding this comment

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

I can open another or after this to remove it from all of the docs at once.

doc/api/util.md Outdated

```js
import('./a.js').then((ns) => {
util.types.isModuleNamespaceObject(ns); // Returns true
Copy link
Member

Choose a reason for hiding this comment

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

(Not necessarily true if there is a then export.)

I’d use an import * as ns example.

Copy link
Member Author

@devsnek devsnek May 9, 2018

Choose a reason for hiding this comment

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

it won't pass lint if i do that, i'd have to ignore the block

Copy link
Contributor

@vsemozhetbyt vsemozhetbyt May 9, 2018

Choose a reason for hiding this comment

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

It seems the comment is a bit confusing: as this is not just a REPL command, this line does not return in the usual sense, but the function returns Promise resolved to undefined. Maybe we should add return and change the comment into Resolves...?

Copy link
Member

Choose a reason for hiding this comment

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

@devsnek Then IMO we should ignore the block.

Copy link
Member Author

Choose a reason for hiding this comment

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

does it look okay at this point?

@vsemozhetbyt
Copy link
Contributor

Node.js Collaborators, please, add 👍 here if you approve fast-tracking.

Copy link
Contributor

@guybedford guybedford left a comment

Choose a reason for hiding this comment

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

Great to see this!

@devsnek devsnek force-pushed the doc/util-types-ismodulenamespaceobject branch from 326cfa2 to 19c4f9b Compare May 10, 2018 01:33
@devsnek
Copy link
Member Author

devsnek commented May 10, 2018

landed in f1cdd77

@devsnek devsnek closed this May 10, 2018
@devsnek devsnek deleted the doc/util-types-ismodulenamespaceobject branch May 10, 2018 20:26
devsnek added a commit that referenced this pull request May 10, 2018
PR-URL: #20616
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Guy Bedford <[email protected]>
Reviewed-By: Vse Mozhet Byt <[email protected]>
Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
@devsnek devsnek removed the fast-track PRs that do not need to wait for 48 hours to land. label May 10, 2018
targos pushed a commit that referenced this pull request May 12, 2018
PR-URL: #20616
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Guy Bedford <[email protected]>
Reviewed-By: Vse Mozhet Byt <[email protected]>
Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
@addaleax addaleax mentioned this pull request May 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. util Issues and PRs related to the built-in util module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants