0

photo showing different colors on vscodeWhen I do

const mongoose = require('mongoose');

The mongoose immediately after const is green.

When I do mongoose.Schema.Types.ObjectId the the whole code, mongoose.Schema.Types.ObjectId is green.

But when I do mongoose.ObjectId the mongoose is green but the objectId is not. What does this mean?(see above image for photo of the same)

YulePale
  • 6,688
  • 16
  • 46
  • 95

1 Answers1

2

The current theme you're using (Dark+) highlights classes, modules, namespaces in green. The reason for mongoose.Schema.Types.ObjectId being green is because all of the text are either a module or a namespace. The reason for mongoose in mongoose.ObjectId being green and ObjectId being not, is becuase mongoose is a module but the ObjectId in this scenario is not.

You can find the difference between mongoose.Schema.Types.ObjectId and mongoose.ObjectId in this StackOverflow post.

Syllight
  • 333
  • 1
  • 9