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

Specify systemJS configuration file for Node tsc compiler

Right now, the Node tsc compiler looks at the tsconfig.jsonfile which looks something like this: { "compilerOptions": { "target": "es5", "module": "system", "moduleResolution": "node", "sourceMap": true, …
A. Duff
  • 4,097
  • 7
  • 38
  • 69
0
votes
3 answers

npm start giving errors on tsc && concurrently

I've been trying to run npm start and I keep getting the following errors... 19 error node v4.2.0 20 error npm v3.10.5 21 error code ELIFECYCLE 22 error resume-editor@1.0.0 start: `tsc && concurrently "npm run tsc:w" "npm run lite" ` 22 error Exit…
user6377738
0
votes
2 answers

TypeScript not resolving file

I know that the TypeScript outFile usage is not recommended. But I am forced to use it until I have time to implement a better solution such as AMD. I believe I am having a "module splitting issue". I have two files in the same directory: File…
user210757
  • 6,996
  • 17
  • 66
  • 115
0
votes
2 answers

Typescript compiler not working

I am using tsc -w to compile my project. I've been using it for quite a long time now but it recently stopped working after a small refactoring for (really) no reason. When I run the command, it shows me instead tsc --help. I didn't touch the…
Takichiii
  • 453
  • 4
  • 14
  • 27
0
votes
1 answer

Using gulp and typescript with gulp-tsc gulp-typings

I am trying to make a simple nodejs express API with typescript, tsc and gulp. When I compile my .ts files with tsc no errors occur. Now I am trying to integrate gulp into my workflow using gulp-tsc and gulp-typings in gulpfile.js Github Project…
0
votes
1 answer

Import namespaced class specifically

I have a namespace set up like this: export namespace Entities { export class Car { } export class Motorbike { } } In another class, I then import Car and Motorbike. However, I am unable to import them succinctly. If I try to import them…
James Monger
  • 10,181
  • 7
  • 62
  • 98
0
votes
3 answers

Why is there so many TS errors even though it compiled fine?

I'm currently trying out TypeScript and combining it with some other JavaScript libraries. I can see the benefits of TypeScript when used with Vanilla JS and wanted to try out the whole idea of using various libraries in combination with declaration…
Sticky
  • 3,671
  • 5
  • 34
  • 58
0
votes
1 answer

Typescript can not find modules

My server .ts files are complaining of not finding the modules and the typings, though I installed the modules and checked the node_modules. This is my project structure: screenshot The errors I get : screenshot The tsconfig.json : { …
0
votes
2 answers

http.get() fails as Promise and Observable

I have two simple services. Both should return the result of a REST API. Originally I've started with a Promise. I could not figure out, why toPromise() was not found (same problem as here. So I tried to switch to Observable. The problem is similar:…
Carsten Franke
  • 1,649
  • 2
  • 13
  • 30
0
votes
1 answer

tsc doesn't detect Angular2 RC definitions

I am using angular 2.0.0-rc.1, but am struggling with the typescript compiler (Typescript 1.8.10). If I run tsc on my project, I get loads of errors like this: app/app.component.ts(1,33): error TS2307: Cannot find module '@angular/core' However, I…
George Edwards
  • 8,979
  • 20
  • 78
  • 161
0
votes
1 answer

Avoid sourceMap files

This is my tsconfig.json { "compilerOptions": { "target": "es5", "module": "commonjs", "moduleResolution": "node", "sourceMap": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, "removeComments":…
user3471528
  • 3,013
  • 6
  • 36
  • 60
0
votes
1 answer

Typescript "-bash: tsc.cmd: command not found"

Learning typescript recently. So I npm installed typescript globally(version 1.8.10), and it's working well to compile ts file into js file. However, when I tried to tsc.cmd to watch the changes in the src file(command line: "tsc.cmd -watch"), it…
Allen
  • 29
  • 7
0
votes
1 answer

typescript tsc error TS2307: Cannot find module '@angular/core'

I am trying to build a typescript project with jenkins. But when i run tsc I get errors regarding non-relative imports from typescript files. Here is a excerpt from the build. + ls…
Kevin Amiranoff
  • 13,440
  • 11
  • 59
  • 90
0
votes
1 answer

TypeScript Errors: Webpack / Angular 2 / Typings

I'm wondering how to get rid of Typings/TypeScript errors like: Property 'modal' does not exist on type 'JQuery'. As far as I know I've properly installed the latest typings for JQuery and it is definitely finding and using them (I have tested…
FireDragon
  • 9,325
  • 4
  • 27
  • 34
0
votes
1 answer

Typescript generates file in incorrect directory

Here is fragment of my tsconfig.json that is used by typescript compiler to generate the JS file for my ts files. The files are picked from the typings directory and the generated sources are supposed to be created in "./app/scripts" directory. For…
randominstanceOfLivingThing
  • 16,873
  • 13
  • 49
  • 72