Standard setup of a monorepo that includes frontend and backend TypeScript code for one app

Hello friends, I'm new to Deno and have what I feel is a relatively simple use case, but I've struggled to find good guidance about it. My repo is here: https://github.com/timschwab/chesswar. Nothing too fancy, messing about with WebSockets and <canvas>. I used to have two repos - one for the backend server and one for the frontend server. But I decided to just join them into one repo, so I could trivially share some code and types between the server code and the client code. However this means that the VSCode workspace includes both Deno server code and frontend TypeScript, and so I don't know the right way to set target and lib. Does this make sense? Any help appreciated. Thanks! examples - if i do
{"compilerOptions": {}
{"compilerOptions": {}
then document.getElementById(id) gives me Cannot find name 'document'. if i do
{"compilerOptions": {"lib": ["dom"]}}
{"compilerOptions": {"lib": ["dom"]}}
then Object.fromEntries gives me Cannot find name "Object" and note that i am using esbuild to actual package up the client code into a JS bundle so this is only to get rid of the vs code errors i think and i did see this: https://deno.com/manual@v1.33.1/advanced/typescript/configuration#using-the-lib-property but i am not certain this answers precisely my question hmm possibly { "lib": ["dom", "deno.ns", "deno.unstable"] } worked this is fine i guess, but doesnt really get at the problem the problem is that two different sets of libs should be used in the two areas: browser code and deno code so ideally i could setup vs code to do that. is this possible?

Looking for more? Join the community!

Recommended Posts
How can I import https://github.com/ensdomains/ensjs-v3/tree/main in my denoThis is npm package. I want to use it in my deno project. How can I achive it? I am trying this: `imTesting that advanced types workI have a bunch of pretty advanced types, with generics and inferences all over the place. What woulHow can I reattach a debugger after disconnecting?I want to be able to start deno from a command line, but be able to attach to it from VSCode. I actPass string from TS to dll and return the passed string. (Like echo)Hey I am currently trying to understand the communication between a dll and my TS program. Currentlydeno-deploy limits on file storage?When deploying static files via deployctl, what are the storage limits / costs per GB? Couldn't findDoes anyone have a working OpenCL deno example?How can I use opencl with deno? Any examples?absolute imports in fresh?how do you get this accomplished?PhpStorm not resolving local import with import_map.jsonDeno Version : deno 1.33.0 (release, aarch64-apple-darwin) v8 typescript 5.0.3 PhpStorm how to cancel test watchon linux. ran `deno test -A --watch tools/json_tools/examples/*.ts` and `ctrl+c` does not seems to Sentry DenoOsUptime is not a function issueI'm using `npm:@sentry/node@7.49.0` and the following script to test the integration ```TypeScript /Property 'openKv' does not exist on type 'typeof Deno'. VSCodeSuch as the title say, I cant get the LSP to recognize openKv in the Deno namespace... deno 1.32.5+Import from direct URL works fine, but NOT via deps.ts``` // ./lib/foobar1.ts // everything is fine import { z } from "https://deno.land/x/zod@v3.21.4/modSmall Deno Script to upload to my server not working due to not being able to be run on CentOSAll my clients run Ubuntu or Debian, and the script will not run on CentOS due to the problem of a GEmpty output in Deno.CommandI’m trying to run the command `git log —grep='.'` from Deno. However, it always returns an empty outPreventing `Deno.stdin` reads from blockingIn a module for reading `Deno.stdin` input, there is a loop that reads and parses the returned bytesCan I pre-cache dependencies that I specify using npm:?Hi! Trying to figure out the right way to combine Deno's module support to make our deploys consisteJSON Schema Core, $dynamicAnchor, and $vocabularySlightly off-topic, but I'm writing a Deno library. Anyone deeply knowledgeable on JSON Schema CoreTest case is leaking resourcesHi, all my tests keeps failing because of ```json error: AssertionError: Test case is leaking 2 reso[have workaround] "deno" and "deno repl" aren't producing outputI typed in "deno" and nothing happened, and I thought it was finally doing the right thing when no aServe Fresh over HTTPS locallyHow can I serve Fresh over HTTPS locally? In node I might generate certs and do ``` https.createSer