In TypeScript, when to use reference, when to use import?

TypeScript
in TypeScript there are two concepts of referencing files/modules. Even though I went briefly through TypeScript documentation it is unclear to me, wh...
1 year ago

Unable to access parameters from union types (TypeScript)

TypeScript
Why am not able to access attributes in union types like this: export interface ICondition { field: string operator: string value: string } ex...
1 year ago

how to assign a const object to be used as a template

TypeScript
I am constructing elasticsearch queries and would like to use object templates for building the POST body of the queries, before sending to my data se...
1 year ago

Angular 2 for TypeScript app testing - specs appear multiple times in jasmine

TypeScript
I have followed this tutorial for testing an Angular 2 app: https://angular.io/docs/ts/latest/guide/testing.html After finishing with the First app t...
1 year ago

How to open untitled text file and insert formatted text using VSCode API in typescript

TypeScript
How to open new read-only text file in tab and insert some formatted text in that file using the visual studio code API. I didnt find any example reg...
1 year ago

Angular ui-state with params type in typescript

TypeScript
What I know When using TypeScript with angular's ui state, I can provide "type assertion" with the UI-Router definitely typed library. Using this, I...
1 year ago

How to make an delay for Angular 2 HTTP calls

TypeScript
Hello I have the following problem: I'm using Angular 2 with TypeScript to make a WebApplication that use HTTP calls to a Rest Server. Now the problem...
1 year ago

Installed jSweet. Now what?

TypeScript
I have a java project which I want to convert into Typescript (about 150 Files). As per http://www.jsweet.org/getting-started/ ...I checked out the ...
1 year ago

Read JSON Data With String Key: Angular2

TypeScript
I am trying to iterate json data in angular2. If JSON Data is like this {fileName: "XYZ"} I am able to iterate using- let data of datas But If my...
1 year ago

import Event Types from React (TypeScript)

TypeScript
How to import Event Types from React? For an example how to import KeyboardEvent so it can be used for onKeyDown callback type annotation? I have br...
1 year ago

TypeScript type definition for promise.reject

TypeScript
The following code is correct in terms of the type that is returned, because then always return the promise array. Promise.resolve(['one', 'two']) .t...
1 year ago

Meteor-Angular2 - ReferenceError: System is not defined

TypeScript
Since I tried upgraded my project to support the last Angular2 router I completely broke my app.h Nothing went smoot and it's been an amazing journe...
1 year ago

document.addEventListener vs. $(document).on

TypeScript
I somehow found a bit strange behavior of adding eventlisteners to document. While adding listeners to HTMLElements works fine adding a listener to do...
1 year ago

angular2, binding a select element to another select element's selection

TypeScript
I have two <select> elements: <select [(ngModel)]="model.SelectedSomeValue"> <option *ngFor="let someValue of model.SomeValues"&gt...
1 year ago

Module loading from Typescript with script.js

TypeScript
I'd like to be able to load external dependencies with typescript from a cdn like so: declare var $script: any; $script(["//cdnjs.cloudflare.com/aj...
1 year ago

Instantiate sub object (object inside object) Angular 2

TypeScript
I've got a model "Profesional" that has a property that is another model "Address": 'use strict'; import * as Address from './models/address'; ex...
1 year ago

Gulp task finished before the output files are generated

TypeScript
---- Updates on top ------ Some friends point out that I should return the stream from the task. That's right but doesn't help. In fact, in my first...
1 year ago

angular 2 Observable complete not called

TypeScript
I am playing around with hero app fro angular 2 tutorial and right now i have this Component import { Component, OnInit } from '@angular/core' import...
1 year ago

naturalWidth - Property 'naturalWidth' does not exist on type 'HTMLElement'

TypeScript
I am trying to access "naturalWidth" in typescript however if I get a compile error or or i get a red line under "naturalWidth". Because $("#contentIm...
1 year ago

Angular2 RC6 - Dynamically load component from module

TypeScript
in my RC5 app I have the following: export class MyComponent { subcompPath = "path-to-subcomp#SubcompClassName"; @ViewChild("placeholder", { ...
1 year ago