Add "required imports" to generated code

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Export to Language
    • None
    • None

      There was some concern that we need to indicate which classes we're using in the generated code so that beginners know exactly how to import the bson classes/etc.

       

      We can use the code in https://github.com/mongodb-js/bson-compilers/blob/test-file/make-test-file.js as a starting point.

       

      Open questions: 

      • how do we want to display this visually?
      • do we only import what we use (therefore do a scan of the exported code) or should we just provide a generic "import" list of things that can be used?
      • Is this required for version 1?

            Assignee:
            Anna Herlihy (Inactive)
            Reporter:
            Anna Herlihy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: