Skip to content

Concerns about DOC_TYPES_MAPPING_GLOBALS #319

@avivkeller

Description

@avivkeller

I see a few issues with DOC_TYPES_MAPPING_GLOBALS:

  1. As https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects grows over time, our DOC_TYPES_MAPPING_GLOBALS variable will be out-of-date. We should probably do one of:
    • (a) fetch the globals at runtime, or
    • (b) have a update:globals script that's run once a month to check the globals for updates, whose source of truth is:
      • (i) MDN
      • (ii) The globals.md file
    • (c) Remove globals entirely, and just use the other data types
  2. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects is, as far as I can tell, incomplete. It doesn't include things that are a part of Web APIs, like fetch, Crypto, and localStorage. It's also, expectedly, missing Node.js-specific globals like Buffer, __dirname, exports, etc. (See 1.ii)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions