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 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...
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...
This comes out of my answer at https://stackoverflow.com/a/48436147/1019307.  I need to change the module kind that the transpiler VS uses to be AMD. It defaults to commonjs even when the <TypescriptModuleKind> is changed in the project.csproj&...
I'm trying to run the TSC command on WebStorm but every time I do I get this error :     AppData/Roaming/npm/node_modules/typescript/lib/lib.d.ts(1378,151):   error TS2314: Generic type 'Promise' requires 2 type   argument(s).   My projec...
I encounter some weird issue when launching my TypeScript solutions (it happens even with the default solution which comes along with a new TypeScript project in visual-studio). Sometimes (it happens very often), when i launch my TypeScript solution...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.