I am a beginner with type script. I am unable to compile the type script file.
As I hit Ctrl+Shift+B in the VS Code, i get the error "tsc is not recognised"
I used npm while downloading transcript.
C:\Users\sramesh>npm install -g typescript
C:\Users\sramesh\AppData\Roaming\npm\tsserver -> C:\Users\sramesh\AppData\Roaming\npm\node_modules\typescript\bin\tsserver
C:\Users\sramesh\AppData\Roaming\npm\tsc -> C:\Users\sramesh\AppData\Roaming\npm\node_modules\typescript\bin\tsc
C:\Users\sramesh\AppData\Roaming\npm
`-- typescript@2.1.5
Here is my tasks.json file
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "0.1.0",
"command": "C:\\Users\\sramesh\\AppData\\Roaming\\npm\\node_modules\\typescript\\bin\\tsc",
"isShellCommand": true,
"args": [],
"showOutput": "silent",
"problemMatcher": "$tsc"
}
Can anyone help?
I tried using the command line to set the target.
tsc first.ts --target ES5
This created the first.js( compiled type script in javascript format).I manually moved this file to scripts folder.
Now when i ran the server using lite-server
command. The browser could find the first.js file and ran the typescript code.
Have you tried running tsc --init
in your directory? This will create a tsconfig.json
file in your directory where you can define your configuration. VSCode will also start using this file once it finds it in your root directory.
Check out tsconfig.json documentation for more details.
Firebase Cloud Functions: PubSub, "res.on is not a function"
TypeError: Cannot read properties of undefined (reading 'createMessageComponentCollector')
Using selenium, and NodeJS, I would like to simply open a browser, wait 5 seconds, then close the browserWhat am i doing wrong?
I'm following an online tutorial building a polling app using node and rethinkdbI created a class of polls in the models directory that has a getAllPolls function
I'm trying to implement the apparently useful and powerful url-to-image moduleUsing the basic example script, I can render and save as a