DenoDDeno
Powered by
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
id
to an ObjectId in
doSomethingById
doSomethingById


deps.ts

export { Bson, MongoClient, Database } from "https://deno.land/x/mongo/mod.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 ]
   .....
}
import {  Bson} from "../deps.ts";


const id = new Bson.ObjectId();


function doSomethingById(id) : void{
   let workers = [id ]
   .....
}
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

How do I get a d.ts file to be used?
JoxJJox / help
3y ago