shultz🇮🇱
Explore posts from serversAsync execution context
Is there any way I can create a global that is unique to an async operation? I would like to use that for logging operation context. Or maybe just a built in way to get some kind ID of the current operation, as in for each task in the event loop getting a different ID, than I can use regular module context with the ID.
4 replies
setting module scope variable based on module import path
I have a big utilities file with many helper functions, mostly arround html parsing. Many of which take a locale argument ("en-UK"). The importing module knows the locale, so I would like to set globalThis.defaultLocale via the import path, something like import { util } from '/utilities.ts?locale=en-US'. Is it possible without generating the files per locale or invoking some "setDefualtLocale()" function at every importing module?
1 replies
typescript compiler (38.24MB) included in bundle when importing google's npm:schema-dts
Not sure if this is a bug, but I couldn't see how the package imports the compiler.
create a ts file with:
import type { Accommodation } from "npm:schema-dts"
deno info [file.ts]
file.ts
└─┬ npm:[email protected] (857.9KB)
└── npm:[email protected] (38.24MB)
7 replies
xstate - no types imported
import * as xstate from "https://deno.land/x/xstate@[email protected]/src/index.ts";
file is cached, yet no types (restarted language server ext.)
any ideas?
5 replies