Questions tagged [tsc]

tsc is a compiler for converting TypeScript into plain JavaScript.

tsc is a compiler for converting TypeScript into plain JavaScript targeting either the ECMAScript 3 or ECMAScript 5 specifications.

927 questions
0
votes
1 answer

sourceMappingURL returns full path. How to switch it off?

I have my own Angular 2 library and trying to compile it with Angular2 official ngc compiler. Everything works fine but when I was inspecting code generated, I found sourceMappingURL returns full path. As I am going to ship it I should not want to…
tom10271
  • 4,222
  • 5
  • 33
  • 62
0
votes
0 answers

typescript commandline tsc -w acts like tsc -h

Could not find anything on webternet on this. when typing tsc --watch it shows me the usage examples as if I typed tsc --help. in addition (maybe it's related) when trying to explicitly compile a ts file, it screams about syntax error when there…
Stavm
  • 7,833
  • 5
  • 44
  • 68
0
votes
2 answers

Solving error - tsc.exe exit code 1

I am following VISUAL STUDIO 2015 QUICKSTART. I have done everything as described in the guide and location of external tools is ./node_modules/.bin and $(PATH) but at build time I get tcs.exe exit code:
Amir-Mousavi
  • 4,273
  • 12
  • 70
  • 123
0
votes
1 answer

TypeScript not compiling when expression used as property name to acess function with an argument who's type has optional fields. TS2349

The following code will not compile in TypeScript 2.1.4 giving the error: Error Error:(6, 31) TS2349:Cannot invoke an expression whose type lacks a call signature. Type '((args: string[], action: A) => string[]) | ((args: string[], action: C) =>…
David Blaney
  • 898
  • 8
  • 17
0
votes
1 answer

Unable to import typescript models, Property does not exit on type typeof and reference errors

I'm trying to create a microservice using NodeJS, Hapi, and typescript. I have a basic route set up that was working, but I can't get my service created and imported using the directory structure that I want. That structure is…
dckuehn
  • 2,427
  • 3
  • 27
  • 37
0
votes
1 answer

how to show count the text in textarea when we drag and drop mouse and right click copy paste

Below the textarea, I want to show the remaining count of the text of textarea when we do drag and drop of the text or mouse right click copy and paste text by tsc or jquery examples ?
usha
  • 1
  • 2
0
votes
2 answers

How does tsc know where are the ts files to compile?

I am trying to learn angularjs v2 from the official documentation. https://angular.io/docs/ts/latest/tutorial/toh-pt1.html https://github.com/angular/quickstart While following the tutorial in the above link, I noticed that after running npm start,…
guagay_wk
  • 26,337
  • 54
  • 186
  • 295
0
votes
1 answer

How does the following script works when started with a NPM build command

I have package.JSON file in which the script is mentioned as, "scripts": { "typings": "typings install", "build": "tsc && webpack", "watch": "npm-run-all -p -r -l tsc-watch webpack-watch", "tsc-watch": "tsc -w", "webpack-watch":…
siddiq rehman
  • 145
  • 1
  • 2
  • 18
0
votes
1 answer

Remove wwwroot from module definition in typescript generated javascript, ie define("wwwroot/services/

Using Asp.Net Core 1.0 and Typescript 2.0 I am attempting to concatenate all generated javascript to a single file (site.js) at the root of wwwroot. My directory structure is: Site --wwwroot\ ----site.js --typings\ --tsconfig.json I've looked over…
Miniver Cheevy
  • 1,667
  • 2
  • 14
  • 20
0
votes
2 answers

How to inform TypeScript compiler of extensions to JS Array prototype?

I have created a polyfill for the JavaScript Array; if (Array.prototype.remove !== 'function') { Array.prototype.remove = function (value) { var idx = this.indexOf(value); if (idx !== -1) { return this.splice(idx,…
mvermand
  • 5,829
  • 7
  • 48
  • 74
0
votes
1 answer

TypeScript compiler confused with large inheritance/extension chain

I have the following (reasonably complex) extension chain. It is a minimal reproducible example of my problem (obviously the classes will have behavioural implementations in my application). export class BaseModel { public someBaseModelMethod():…
James Monger
  • 10,181
  • 7
  • 62
  • 98
0
votes
1 answer

Systemjs and tsc setup - *.ts.js 404 (Not Found) Error

I was just trying to create proof-of-concept TS + SystemJS project with minimum possible setup - without "Angular2 starter kit" and such. I've spent an hour googling and tweaking this setup but it still doesn't work. I have the following…
shershen
  • 9,875
  • 11
  • 39
  • 60
0
votes
1 answer

Ctrl+Shift+B not compiling typescript code in visual studio code

I am using VS code for Angular 2 application. After coding my ts files when I try to compile to JS it doesn't happen. The JS file is not getting created. I get no errors on Ctrl+Shift+B. What could be causing this? PS: I have done the configuration…
Peter
  • 10,492
  • 21
  • 82
  • 132
0
votes
2 answers

How to compile TypeScript to JavaScript into a different folder

I have two folders: TypeScript and JavaScript. I need to compile the TypeScript file which are in TypeScript folder to JavaScript files in the JavaScript folder.
user4739287
0
votes
1 answer

How to debug tsx files when using webpack

I'm new to front-end development. I write some reactjs component in tsx format. this is one of my tsx files: import * as React from "react"; import {observer} from "mobx-react"; import {observable} from "mobx"; import {TileGrid, Tile} from…
Ehsan
  • 1,093
  • 1
  • 12
  • 21