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

requiring an npm module using typescript

I'm working on a new nodejs 5.10.1 project using typescript. I have tsc installed version 1.8.9 I created a new project that contains the following configuration files: package.json { "name": "mdb-analyze", "version": "1.0.0", "description":…
ufk
  • 30,912
  • 70
  • 235
  • 386
0
votes
1 answer

Atom tsconfig not compiling (when it VScode it does)

I'm currently switching from VScode after some trouble with it. My main problem is that in VScode my TypeScript compiles perfectly, but in Atom it is not doing anything ... Here's my tsconfig.json { "compileOnSave": true, "compilerOptions": { …
0
votes
0 answers

Typescript compiler build errors from Visual Studio 2015

I set up a basic web application with Angular2 and Typescript. On build of the solution, I get many errors like : TS2304: Cannot find name Promise and these are coming from inside the node_modules folder. Visual Studio 2015 won't take tsconfig.json…
lbrahim
  • 3,710
  • 12
  • 57
  • 95
0
votes
1 answer

Support of "export ... from" by the TypeScript compiler

Is the following export supported by the tsc compiler? export {PromiseWrapper, Promise, PromiseCompleter} from 'angular2/src/facade/promise'; Thanks for your help!
Thierry Templier
  • 198,364
  • 44
  • 396
  • 360
0
votes
2 answers

tsc --out weird behavior when using 'import' in my files

I have two typescript files, app.ts, and `angular2.d.ts' (which contains type definitions for angular2) my tsconfig.json file looks like so: { "compilerOptions": { "module": "commonjs", "out": "public/all.js", "sourceMap": true, …
Elad Katz
  • 7,483
  • 5
  • 35
  • 66
0
votes
1 answer

typescript (tsc) error on Array<>

when I run tsc on the command line (version 1.4.1) on the following file I get an error: test.ts (1,13): Expected ';' var x: Array; x = [2]; Any ideas what might be going on?
Adam Tegen
  • 25,378
  • 33
  • 125
  • 153
0
votes
2 answers

TypeScript compiler produces JavaScript in the d.ts file (v1.0 - v1.3)

Running tsc --out output.js --declaration input.ts returns output.js and output.d.ts as expected. The d.ts file contains JavaScript instead of type declarations. This procedure used to work 9 days ago, and I haven't updated TypeScript since. Any…
Doug
  • 2,441
  • 2
  • 19
  • 22
0
votes
2 answers

No "--version" switch for tsc on Ubuntu

How do you find out which version of typescript/tsc you run under Ubuntu? There's no manual or --version switch for tsc.
Olle Härstedt
  • 3,799
  • 1
  • 24
  • 57
0
votes
1 answer

Compile .ts without

Visual Studio can compile TypeScript project (even one file on save) without any tags. Can I compile all *.ts files some way from command line (tsc.exe)? Simple, for edit TypeScript in WebStorm or in other IDEs.
KhodeN
  • 353
  • 1
  • 3
  • 10
0
votes
1 answer

Too many TypeScript compiler instances

Now that I have a number of reasonably sized TypeScript libraries and apps I have noticed that builds reduce my multi-core 8Gb dev machine to a crawl. The cause is the large number of TypeScript compiler instances spun up by VS2012 when I do a…
andyks
  • 478
  • 1
  • 5
  • 9
0
votes
1 answer

typescript compiler error: Cannot convert '{}[]' to 'Array'

I'm having compiler errors with this typescript code:) I've defined playerBullets like so: playerBullets: Array = Array[40]; and try to do this: this.playerBullets = this.playerBullets.filter(function (bullet) { return bullet.active; }); but…
Nikos
  • 7,295
  • 7
  • 52
  • 88
0
votes
1 answer

TypeScript generating wrong JS in Release Mode

I do not know if this is a known issue. I am working with VS 2012 Web Express with Typescript 0.8.1.1. I am using the --module AMD clause to generate AMD modules. Iin Debug mode the compiler generates a define clause like this: define(["require",…
mvbaffa
  • 1,031
  • 2
  • 10
  • 21
0
votes
3 answers

Typescript compiler error: "Unable to get value of the property 'publicMembers': object is null or undefined"

I've found a scenario where I can reliably get the TypeScript compiler to fail with the error message: "Internal error: Unable to get value of the property 'publicMembers': object is null or undefined" Here's my Repro.ts file: interface Callback {…
Ken Smith
  • 20,305
  • 15
  • 100
  • 147
0
votes
1 answer

TypeScript tsc raising error "Invalid handle" 80070006 (solution)

I got this exception when running tsc from cmd command line prompt (Windows 7 x64): set tsc="c:\Program Files (x86)\nodejs\node_modules\typescript\bin" %tsc%\tsc.js foo.ts
David Berneda
  • 490
  • 5
  • 9
-1
votes
0 answers

I'm getting this error when trying to run my angular app( error TS1005: ';' expected.)

src/api/node_modules/@types/express-serve-static-core/index.d.ts:1169:18 - error TS1005: ';' expected. 1169 * Check if setting is enabled (truthy). getting this error my typescript version in installed in project is "typescript": "~4.0.5" and…
1 2 3
61
62