typescript1.7 Questions
4
The following doesn't compile with error "a function whose declared type is neither void nor any must return a value or consist of a single throw statement".
Is there a way to make the compiler re...
Cottle asked 23/12, 2015 at 16:17
4
Solved
How can I group data in Angular 2 with TypeScript. I am aware that this is done using "group by" filter in Angular 1.X, but not getting how to group data in Angular 2. I have this array:
import {E...
Dorpat asked 16/5, 2016 at 7:14
2
I tried to apply the @Reflect.metadata decorator to a TypeScript class, following the example on lines 82-84 of reflect-metadata.d.ts:
/// <reference path="node_modules/reflect-metadata/reflect...
Nehemiah asked 28/12, 2015 at 20:27
2
I need to change the TypeScript generated js file name to something else. How can I do that
For example I have MyCompany.ClassA.ts
It will generate MyCompany.ClassA.js by default
But I want MyC...
Ligniform asked 8/2, 2016 at 19:35
4
Solved
I just started a new nodejs project using typescript. I installed Typings (https://github.com/typings/typings) and used that to install reference files for node v4.x and express v4.x.
My node vers...
Colloquial asked 1/2, 2016 at 2:37
2
Solved
I have defined a static property as such:
private static colorsByName: { [index: string]: MyColorClass}
but when I attempt to use for... of from the answer listed here: TypeScript for-in stateme...
Berglund asked 12/2, 2016 at 19:10
1
I'm working on an angular2@beta project in VS 2013 after familiarizing myself with it in IntelliJ. IntelliJ can be set to find the tsconfig.json file and, as of TypeScript 1.6, it can therefore rea...
Pegasus asked 19/12, 2015 at 3:25
2
I'm learning angular and Typescript.
I have a CustomerService an in this service I Have a method which I wish to return an array of customers from a RESTfull service.
Initially I created my GetCu...
Yolanda asked 12/12, 2015 at 20:5
1
I'm using Angular2 + WebPack + Typescript 1.7 stack + SASS + CommonJs.
I have webpack SASS loader configured to watch for scss files with "style!css!sass" loaders.
In my component I have @View de...
Garwin asked 13/12, 2015 at 14:43
2
Solved
I'm getting a error that is currently causing lots of frustration. Here's what I running with:
ASP.NET Core 1.0 RC1
Angular2, 2.0.0-beta.15
TypeScript, 1.7.6.0
The error(s):
Angular 2 is run...
Sweetening asked 22/4, 2016 at 1:42
1
I'm using type script and getting below error when trying to set custom property with Google marker.
Can anyone please advice how to set custom property with Google Map Marker?
Argument of typ...
Bite asked 21/2, 2016 at 21:10
1
Solved
The following produces valid, working ES5 but emits the error below. I'm using Typescript 1.7.5 and I think I've read the whole language spec and I cannot figure out why this error is produced.
e...
Patrizia asked 14/2, 2016 at 22:12
2
I'm using the built-in parser to generate the AST from source code:
const ts = require('typescript')
//...
const ast = ts.createSourceFile(filename, fs.readFileSync(filename).toString(), ts.Script...
Undue asked 12/1, 2016 at 5:19
2
Solved
I'm getting a bit lost in TS re-exports. Say I create a pair of test modules;
test1.ts;
export function test1() {
return 'test';
}
test2.ts;
export function test2() {
return 'test';
}
I be...
Woodham asked 1/1, 2016 at 15:50
2
Solved
I am quite familiar with the async/await of C# and been using TypeScript for a year or so, can anyone please give a simple example explaining how it works in TypeScript?
It would be very helpful if...
Pogge asked 4/9, 2015 at 15:33
1
Solved
Very frustrating, I am in a situation where TypeScript is compiling fine, but I am still getting Intellisense errors.
This is TypeScript 1.7 in Visual Studio 2015, Update 1.
When I make a cha...
Pyxie asked 19/12, 2015 at 19:1
3
Solved
Is there an interface in TypeScript to describe a class declaration?
function module(name: string, classDeclaration: IClass) {
this.classHash[name] = classDeclaration; //example use of class dec...
Aruspex asked 18/12, 2015 at 8:29
1
Solved
After updating TypeScript to version 1.7 (the latest version at this time) I've been seeing Resharper point out errors, for example when using namespace, const and let, even though they should be s...
Expend asked 7/12, 2015 at 5:45
1
Solved
I have recently stumbled upon this weird (imo) behavior in TypeScript.
During compilation it will complain about excess properties only if the expected variable's type is an interface if the interf...
Anyone asked 9/11, 2015 at 17:5
4
Solved
In the example below (Typescript, 1.7+), what would I have to change to allow B.callback to have a different signature than A.callback?
class A {
callback(result: number) {
}
}
class B extends...
Postmistress asked 5/11, 2015 at 10:36
1
© 2022 - 2024 — McMap. All rights reserved.