Questions tagged [grunt-ts]

A Grunt plugin that compiles TypeScript down to JavaScript for running in non-TypeScript environments.

Helps to compile and manage your TypeScript project. TypeScript allows you to write your code as you like, for example you can use java/C class style constructs.

30 questions
13
votes
2 answers

Creating a single CommonJS module from several TypeScript classes

I'm trying to work out the best way to split my application into a few CommonJS modules that can be consumed by other applications. I have 5 TS classes, and I'd like to bundle them as a single CommonJS module. I then intend to publish this module…
LJW
  • 2,378
  • 1
  • 21
  • 35
6
votes
2 answers

error TS6044: Compiler option 'types' expects an argument

i'm facing with the following error error TS6044: Compiler option 'types' expects an argument. when trying to set "types": [] in tsconfig.json. We are using grunt-ts This is recommended by official TS documentation in order to get rid of the…
VladosJS
  • 1,210
  • 8
  • 20
6
votes
1 answer

Latest version of jQuery for TypeScript is throwing syntax errors?

I am almost 100% sure I am doing something wrong to cause this as I am incredibly new to TypeScript and have been updating an old codebase. When I update jQuery to the latest version I get the following errors when I try and build my project using…
Toby
  • 8,483
  • 13
  • 45
  • 68
5
votes
2 answers

'Duplicate identifier' error when compiling typescript definition files to wwwroot folder

I have created a ASP.NET 5 project which I use mainly for a front-end typescript application. I'm using grunt and grunt-ts to do the compilation. I have a 'src' folder where all my typescript files are contained grunt-ts compiles everything in the…
4
votes
0 answers

Karma test task fails after grunt-ts compiles typescript into js

Currently i'm converting old Angular 1 project from ES5 to TS. We choose approach to rename all legacy files to typescript, fix compilation errors and write new Angular 1 components using typescript. We are using grunt-ts for compilation. After…
VladosJS
  • 1,210
  • 8
  • 20
4
votes
0 answers

sourcemap references wrong line, most often last line of source file

I am using grunt-ts (v5.3.0beta.2, tsc v1.7.3) to compile my typscript files to javascript with inlineSource + inlineSourceMaps for debugging My grunt configuration looks like this : grunt.initConfig({ ts: { project: { src:…
3
votes
0 answers

Typescript debugging with concatenated js files

We use this setting in development: we develop our angular project in typescript using IntelliJ IDEA transpile our typescript code to javascript with grunt-ts concatenate all transpiled javascript files to one singe all.js file using…
3
votes
2 answers

What exactly I should do to make 'angular' resolved in .ts file in WebStorm

I wonder.. what exactly I should do to make WebStrom (or IntelliJ IDEA) resolve my 'angular' variable. I follows this guy but that maybe deprecated already. On my vendor.d.ts: /// ///
ses
  • 13,174
  • 31
  • 123
  • 226
2
votes
2 answers

grunt-ts watch not working when file changed

I am using grunt: "dev-build": { src: ["src/**/*.ts", "typings/vendors.d.ts","typings/tsd.d.ts", "!libs/**/*.ts"], outDir: "artifacts/dev", watch: "src/**/*", options: { …
Poul K. Sørensen
  • 16,950
  • 21
  • 126
  • 283
2
votes
2 answers

Prevent grunt-ts from generating multiple .map and .js files

We are using Grunt to compile and concatenate our typescript files into a single javascript file located in our distribution folder. That functionality is working properly, but Grunt also creates .map and .js files for every ts file it finds;…
2
votes
1 answer

compile only the changed typescript file with grunt-ts

I would like to compile only the changed typescript files with grunt-ts (otherwise it would be extremely slow), but it seems that I cannot. I was trying to start it as a concurrent task, but in this case it seems that my normal watch is not…
eesdil
  • 1,931
  • 3
  • 16
  • 25
2
votes
1 answer

Typescript modules with requirejs, undefined prototype while extending module

I am trying to setup a modular structure for my typescript project. I want to structure it so that i can have modules in different folders and have every class that belongs to that module in seperate files. I am working on a module that is going to…
Jurgen Welschen
  • 871
  • 1
  • 13
  • 21
1
vote
0 answers

Compile typescript using grunt-ts does not use definition files

When I build the project using "tsc.exe" it compiles fine. I'm attempting to compile this typescript file: chrome.history.search(null, (historyItems) => { }); I added the chrome definition files using npm install @types/chrome. It builds…
chustar
  • 12,225
  • 24
  • 81
  • 119
1
vote
1 answer

adding a custom grunt task to sails.js

I'm new to sails.js but I've been reading a bunch of the documentation for the last couple of days so I feel like I have a basic grasp on the platform. But I can't seem to get custom grunt tasks added and registered. I've tried a few ways and none…
b1kjsh
  • 1,109
  • 2
  • 9
  • 21
1
vote
2 answers

grunt-tslint is not working at the watch task

I'm working on an angular2 project and have included grunt-tslint to improve my code. The grunt task "tslint" and default grunt task is workink fine but when I include it to the watch task it's not linting. I tried to delete every other watch task…
trololololol
  • 113
  • 1
  • 8
1
2