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

Ionic 2 allowJs produces comile error

I am trying to implement a custom JS library that I have written into a TypeScript Ionic 2 project. I have no typings because I wrote it myself. For that I changed my tsconfig to { "compilerOptions": { "allowSyntheticDefaultImports": true, …
mchl18
  • 2,119
  • 12
  • 20
0
votes
1 answer

typescript compile on save breaks AngularJS in Visual Studio 2017

I have a Visual Studio Community 2017 (15.2) project with AngularJS 1.6.5 and a NancyFX server. Code here: https://github.com/GusBeare/NancyAngularTests This is a playground for me to learn and test features I'd like to use on a real project. All…
Norbert Norbertson
  • 2,102
  • 1
  • 16
  • 28
0
votes
0 answers

Use tsc --watch to transpile files to directory relative to source file, not tsconfig.json

Say I have a tsconfig.json file in a certain directory, and it looks like so: { "compilerOptions": { "outDir": "./target", "types": [ "node" ], "typeRoots": [ "node_modules/@types" ], "target": "es5", …
Alexander Mills
  • 90,741
  • 139
  • 482
  • 817
0
votes
1 answer

DefinitelyTyped -> React package -> tsc 2.2.2 error TS1005, TS1128, TS1109 and TS1136

I found this package for React that has a component exactly like the one I need. Unfortunately no typings were available so I decided to create them…
Ogglas
  • 62,132
  • 37
  • 328
  • 418
0
votes
1 answer

Typescript error on newly created files

I get this error Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning. only in newly created files. I tried all solutions like setting…
Vamshi
  • 9,194
  • 4
  • 38
  • 54
0
votes
1 answer

Which compiler to use for Koa - TSC or Babel?

I am using koa framework of node.js. I have implemented my code using typescript. I have created .ts files for the same and I am using tsc compiler to compile it. Should I use babel or tsc for compiling the code?
0
votes
2 answers

Typescript DragEvent syntax

I have an angular application where I need to explicitly fire a drag event. I am using AOT - ngc and rollup. let event1 = new DragEvent(); event1.initDragEvent('dragstart', true, true, null, null, null, null, null, null, null, null, null,…
Shilpa Nagavara
  • 1,055
  • 2
  • 16
  • 31
0
votes
1 answer

How to anger TSC with Lookup types

I want Typescript compiler (TSC) to get angry at me when I mistype signatures. export class EventEmitter { subscribe(type: keyof EventTypes, fn:
Chris D
  • 134
  • 1
  • 10
0
votes
1 answer

Command "npm run tsc" does not work in an offline machine - trying to compile node_modules libraries

I want to execute the following commands in an offline machine (A) but the seconds point does not work: npm install npm run tsc We have a machine (A) that contains my TypeScript APP and another machine (B) that acts as Artifactory (contains all…
pakkk
  • 289
  • 1
  • 2
  • 13
0
votes
2 answers

Long TypeScript compilation time?

I am using TypeScript 2.2.1 and I am experiencing a long compilation time when doing tsc, so I added the --diagnostics hoping it can give me more information. However, I noticed the "Total time" reported is not accurate to the time I observed. For…
Anthony C
  • 2,117
  • 2
  • 15
  • 26
0
votes
1 answer

Typescript Compiler doesn't find several npm packages (gulp-typescript)

I'm using gulp-typescript to compile my typescript files. It works but it doesn't find external modules like "@angular/core". How can I configure TSC to look for these modules in node_modules? PS: I'd like to bundle the typescript files with…
phip1611
  • 5,460
  • 4
  • 30
  • 57
0
votes
0 answers

Print QR code with XPS document writer instead of the actual TSC ME240 printer

I have an application that prints QR code stickers. It works fine. Now I'm wondering if I can create an XPS document to view the QR code on the monitor before printing it. I tried setting Microsoft XPS Document Writer as the printer in the openport…
Artemis
  • 413
  • 3
  • 10
  • 24
0
votes
0 answers

TS1056 - Accessors only available ... tsc not picking up tsconfig.json

For code examples, scroll below. First section contains the TypeScript, second one the tsconfig.json and package.json. Using tsc (v2.1.6). The question I have is how can I detect if typescript is picking up my tsconfig.json, see github repo where…
Yves Schelpe
  • 3,343
  • 4
  • 36
  • 69
0
votes
1 answer

Typescript name generation mechanism

We are trying to organize an older package. In order to this we started to change the original "export = module" form to "export default module". This change breaks an other part of the code which uses eval(), since the "import module from 'module'"…
0
votes
1 answer

Angular 2 - tsconfig outDir

I'm currently developing an Angular2 application and I'm facing the following problem - I have some unit tests in my project and I don't want them to be sent to the /dist folder along side with my other code. My project structure is as follows:…