question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unclear how to indicate tsconfig to plugin

See original GitHub issue

I’m using a tsconfig.json to add “DOM” to the lib compilerOptions for typescript, and running deno bundle -c tsconfig.json whatever.ts. I can’t see any way to get the plugin to acknowledge the existing of the DOM lib though. Is this supported?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:5
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
justjavaccommented, May 28, 2020

I will fix it

2reactions
TTSKarlssoncommented, May 31, 2020

@Ragzouken , unrelated to actually setting the tsconfig.json but related to your “dom” problem that you wanted to solve. I got it working by introducing a triple slash reference.

/// <reference lib="dom" />
document.getElementById("foo");

Edit: For compilation purposes, you also need a tsconfig.json, mine looks like this:

{
  "compilerOptions": {
    "module": "esnext",
    "target": "esnext",
    "lib": ["DOM", "DOM.Iterable", "ESNext"]
  },
  "exclude": [
    "node_modules"
  ]
}

And compile with deno bundle -c tsconfig.json file.ts file.js

Read more comments on GitHub >

github_iconTop Results From Across the Web

Specify tsconfig file to use for heft build/start/test · Issue #2258
Currently the Heft TypeScript plugin blindly and greedily assumes that any tsconfig-*.json files in the root directory are meant for its ...
Read more >
Specify path to tsconfig.json - typescript - Stack Overflow
I am using webpack with awesome-typescript-loader in an environment with multiple tsconfig.json files. Is there a way in webpack to specify the path...
Read more >
TSConfig Reference - Docs on every TSConfig option
Intro to the TSConfig Reference. A TSConfig file in a directory indicates that the directory is the root of a TypeScript or JavaScript...
Read more >
TypeScript: Sorting out tsconfig. Part 1 - DEV Community ‍ ‍
Each new project I prefer to write on TS rather than native JavaScript. In this article, I will not discuss the reasons for...
Read more >
3 Options to Compile Typescript to JS: Rollup, TSC, Babel
What is ideal from this config file is that the typescript plugin has ... Note that the original tsconfig has declaration set to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found