dan.the.discloserD
Denoβ€’4y agoβ€’
2 replies
dan.the.discloser

How do I declare something to be an objectID

How do I declare
id
to an ObjectId in doSomethingById

deps.ts

export { Bson, MongoClient, Database } from "https://deno.land/x/mongo/mod.ts";


workerBee.ts
import {  Bson} from "../deps.ts";


const id = new Bson.ObjectId();


function doSomethingById(id) : void{
   let workers = [id ]
   .....
}
Was this page helpful?