tsc Questions
6
I've installed typescript 2.4.1 on my system globally (tsc -v gives me version 2.4.1). I want to uninstall it as I want to go to version 2.3.4 for some of my e2e tests to work. But right now I'm un...
Sapro asked 29/9, 2017 at 5:40
2
I am using Vite with a Typescript React project. I have jest tests in my project as well.
When I run vite build it seems to be compiling and bundling my test files. I have some stubbed out tests th...
7
When running tsc, I am getting many TS2688: Cannot find type definition file for 'someLibrary'
These libraries came from node_modules. I have tried to exclude node_modules and skipLibCheck in tscon...
Elnoraelnore asked 27/8, 2020 at 10:3
5
I have this:
$ tsc -m amd --outFile dist/out.js lib/index.ts
lib/index.ts(87,48): error TS1005: ';' expected.
Is there a command line option I can use to ignore errors?
Gallop asked 11/1, 2018 at 5:8
2
Solved
Whenever I'm making a project with a TSConfig file, I usually end up stripping a lot of the helper comments for different properties away. Is there any tool, tsc flag, or script I can use to automa...
Monogyny asked 12/11, 2022 at 15:12
1
While every topic I can find wants to fix or disable the TS2339 error, I'm trying to get the eslint rules in-sync with typescript rules and I would like to enable it.
In looking at the typescript-e...
Diversified asked 26/4, 2022 at 15:34
6
Solved
I am getting this fairly non-sensical tsc transpilation error:
error TS6059: File
'/Users/alex/codes/interos/teros-cli/src/logging.ts' is not under
'rootDir' '/Users/alex/codes/teros/notifier-...
Whitmore asked 9/8, 2019 at 1:29
19
Solved
When I run tsc in the terminal (it does not matter where) I get returned:
$ npx tsc --version
This is not the tsc command you are looking for
To get access to the TypeScript compiler, tsc, from...
Index asked 24/5, 2021 at 18:41
6
Solved
Consider a simple typescript project with the following directory structure:
| package.json
| tsconfig.json
|
\---src
| app.ts
|
\---foobar
Foo.ts
Bar.ts
tsconfig.json has been configured...
Priedieu asked 21/2, 2017 at 0:18
15
I'm using tsc build tasks. Unfortunately I'm always getting the same errors from the node modules folder
Executing task: .\node_modules\.bin\tsc.cmd --watch -p .\tsconfig.json <
node_modules/@ty...
Hexylresorcinol asked 1/8, 2018 at 13:18
9
Solved
I can't seem to get the outDir flag working when used in package.json. Directory structure is pretty simple: tsconfig.json at the root level, together with a src/ directory and a single index.ts fi...
Overplay asked 13/8, 2017 at 13:45
8
Solved
Instead of uploading the precompiled dist directory, I want to compile src at server side instead.
Here are my scripts inside package.json:
"scripts": {
"test": "echo \"No test specified\" &...
Tart asked 25/2, 2018 at 10:58
14
Solved
I'm running on a MacBook Air. I installed VS Code as an IDE and also have TypeScript installed.
I have a simple file with just this line:
import fs = require('fs');
I'm getting a red squiggly unde...
Toilette asked 16/5, 2016 at 18:36
1
I am creating a component-library and using tsc to output a 1:1 of my tsx files to .js files. However I cannot get this to working:
comand
...
"ts": "rm -rf dist && yarn tsc ...
Inscrutable asked 10/11, 2021 at 13:41
30
Solved
I want to install typescript, so I used the following command:
npm install -g typescript
and test tsc --version, but it just show 'tsc command not found'. I have tried many ways as suggested in...
Sodamide asked 9/9, 2016 at 6:13
12
Solved
I have a TypeScript nodejs server with this structure:
tsconfig.json
package.json
src/
middleware/
utils/
index.ts
dist/
middleware/
utils/
index.js
When using TypeScript 2, I was able to tr...
Luciennelucier asked 31/8, 2018 at 19:35
18
I am trying to setup aliases for my mock server. Whenever I try to compile ts files, it returns error that it couldn't find proper modules even though those are defined in tsconfig,json->paths
Fol...
Hersey asked 18/6, 2019 at 13:48
2
I have this:
const symbols = {
typeMap: Symbol('type.map')
}
interface LangMap {
[key: string]: string | true,
golang: string,
typescript: string,
java: string,
swift: string
}
export cons...
Aynat asked 21/11, 2018 at 2:59
8
I'm building a discord.js Discord bot. Now for some reason, discord.js doesn't work with ESM modules (a totally separate issue), so my bot app uses CommonJS modules. Now I have another project on m...
Frederick asked 12/12, 2020 at 13:22
1
I tried TypeORM, and I got "ColumnTypeUndefinedError: Column type for User#email is not defined and cannot be guessed. Make sure you have turned on an "emitDecoratorMetadata": true
o...
Dusky asked 3/5, 2021 at 17:18
3
Solved
I'm very confused about the difference between tsc and ts-node. I'm learning TypeScript and I usually transpile server .ts files with tsc command.
Now, I'm approaching nestjs framework, and I see ...
Deicide asked 20/7, 2018 at 18:22
5
suppose I have this monorepo:
/apps
/apps/app1
/apps/app1/src (contains index.ts and many other files and subfolders here)
/apps/app1/tsconfig.json
/apps/app1/package.json
/apps/app2
/apps/app2/sr...
Probst asked 25/9, 2023 at 18:37
7
I have typescript and uses the aliases.
Here is part of tsconfig.json
"compilerOptions": {
"baseUrl": "./src",
...
},
By setting the base url, I can change
import User from "src/models/User.m...
Upheaval asked 4/12, 2019 at 15:47
0
Yarn installs long as a dependency for other modules. It installs the "umd" version, which is apparently a CommonJS module.
I receive the following error:
node_modules/long/umd/index.d.ts...
Croquet asked 20/9, 2023 at 19:32
10
Solved
I'm fairly new to TypeScript, and right now I have .ts files in several places throughought my project structure:
app/
|-scripts/
|-app.ts
|
|-classes/
| |-classA.ts
| |-classB.ts
|
|-con...
Staging asked 27/6, 2014 at 14:31
1 Next >
© 2022 - 2024 — McMap. All rights reserved.