Questions tagged as 'typescript'

1
answer

What are the main differences between Dart and TypeScript?

We've already had a query comparing two languages that run on top of JavaScript . I think I have missed comparing two languages created for the purpose of creating browser applications and solving JavaScript problems with very different appr...
asked by 04.02.2015 / 17:55
2
answers

Use of '@' in variables

I see in some languages that compile for javascript, like TypeScript and CoffeeScript, the use of @ in variables, as well as cases where it is not used. For example: w = 10; @v = 11; In the end, what is the @ and what is the d...
asked by 19.04.2017 / 16:23
1
answer

How to Extend / Inherit Angular Component2?

Doubt I would like to create extensions for some components already implemented in Angular 2, without having to rewrite them almost completely, because the base component could undergo changes and I would like these changes to be reflected...
asked by 06.04.2016 / 20:26
2
answers

How to know which conditional is giving true?

For example, I have the following if : if(!condicao1 || !condicao2 || !condicao3){ retorno erro com a condiçao que nao existe } When it enters this if I would like to know which of the parameters is missing to return an error...
asked by 04.01.2018 / 02:07
1
answer

Bring id on route

I'm doing a user management. At the moment, I'm creating the put to edit. But, I do not know how to bring the id on the route. There is a list of users and also an insert. When the client clicks on the button to recover the password, I would...
asked by 01.11.2017 / 19:55
2
answers

GroupBy in Javascript

I'm getting the following result from a query: [ { "disciplina": "Portugues", "periodo": "1º Bimestre", "tipo": "1ª avaliacao", "valor": 9.5 }, {...
asked by 04.02.2017 / 01:32
1
answer

What does it mean _: e _

What does _: e _ mean? in the definition of functions as in the example below. constructor(){ router.events.subscribe((_:NavigationEnd) => this.currentUrl = _.url); } I have many doubts about it.     
asked by 04.08.2018 / 16:36
3
answers

How to use constructor overload in TypeScript?

In languages with C #, for example, you can use the builder overload as shown below: public class Teste{ public Teste(bool a, int b, string c){ } public Teste(bool a, int b){ } public Teste(bool a){ } } After...
asked by 11.10.2016 / 19:52
3
answers

Angular + ASP.NET MVC: Makes sense?

I'm starting to study Angular2. As I'm working a lot with .NET I've decided to do a project with ASP.NET MVC 4 and Angular2. Reading the hello world of the Angular I noticed that the Angular has its own route mechanism, which would in a w...
asked by 10.02.2017 / 03:20
1
answer

Syntax TypeScript

I'm studying TypeScript but I do not understand the meaning of this example: interface Person { firstname: string; lastname: string; } function greeter(person : Person) { return "Hello, " + person.firstname + " " + person.lastname...
asked by 31.03.2014 / 15:56