I'm fairly new to TypeScript, and right now I have .ts files in several places throughought my project structure:  app/  |-scripts/     |-app.ts     |     |-classes/     |  |-classA.ts     |  |-classB.ts     |       |-controllers/     |  |-contro...
In the image below on the left in the folders you can see my /src Typescript (blue) compiled into my /dist (purple) Javascript using tsc.    You can see in the source file on the left that references a .ts module file that it isn't compiled into...
How to run a npm script command from inside a gulp task?  package.json  "scripts":  {     "tsc": "tsc -w" }   gulpfile.js  gulp.task('compile:app', function(){   return gulp.src('src/**/*.ts')     .pipe(/*npm r...
I am struggle with create proper unit tests for the angularjs (v1.4.9) application which contains both javascript files (with jasmine tests) and typescript files (with no tests at all, now I am trying to use Mocha, but it can be any framework).   Hen...
I have the following example:  class Uncle {   constructor(public name : string) { }    talk() {     return "Hello my name is " + name;   } }  let p : Uncle = new Uncle("Jo"); console.log(p.talk());   For certain variable names, types...
I'm trying to get Babel to produce sourcemaps when run from the command line. The Babel docs around sourcemaps seem to be targeted more toward the gulp workflow and I'm not sure how that translates to the command line.  I'm compiling my t...
Tsconfig:  { "compilerOptions": { "target": "es5", "module": "commonjs", "emitDecoratorMetadata": true, "experimentalDecorators": true, "sourceMap": true, "noEmitHelpers": true,...
I have a simple hello world file called test.ts with the following contents:  export class Hello {   constructor() {     console.log("hello world!");   } }   When I run the command tsc test.ts --module amd --out bla.js, a test.js file is crea...
I have a TypeScript error message whose error I do not understand. The error message is:     error TS2345: Argument of type '(error: Error) => void | Promise' is not assignable to parameter of type '(reason: any) => IdentityKeyPair...
I'm still giving a shot at typescript. I've written a trivial "hello world" typescript module and published it to npm. Really trivial, just does a default export:  export default function hello(target: string = 'World'): void...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.