tagged [typescript]
What does the "as" keyword do?
What does the "as" keyword do? I'm not even sure if `as` is a keyword, but anyway, what does it do in JavaScript?
- Modified
- 27 Jan at 15:18
How to get argument types from function in Typescript
How to get argument types from function in Typescript I may have missed something in the docs, but I can't find any way in typescript to get the types of the parameters in a function. That is, I've go...
- Modified
- 22 Jan at 10:30
How can I declare a global variable in Angular 2 and up / Typescript?
How can I declare a global variable in Angular 2 and up / Typescript? I would like some variables to be accessible everywhere in an `Angular 2` in the `Typescript` language. How should I go about acco...
- Modified
- 4 Mar at 13:51
Programmatically compile typescript in C#?
Programmatically compile typescript in C#? I'm trying to write a function in C# that takes in a string containing typescript code and returns a string containing JavaScript code. Is there a library fu...
- Modified
- 11 Oct at 02:37
How to convert a string to number in TypeScript?
How to convert a string to number in TypeScript? Given a string representation of a number, how can I convert it to `number` type in TypeScript? ``` var numberString: string = "1234"; var numberValue:...
- Modified
- 1 Jun at 21:30
ServiceStack and Angular 2
ServiceStack and Angular 2 Can anyone guide me on how to make Angular 2 with TypeScript work on a self hosted ServiceStack service? I had it running with Angular 1 and Razor but now...I am lost.
- Modified
- 8 Aug at 15:0
servicestack VueJS Compile failure
servicestack VueJS Compile failure [enter image description here](https://i.stack.imgur.com/Fvnb3.png) After installing Vuejs in the servicestack then run the project it shows error like this.kindly g...
- Modified
- 17 Nov at 10:24
What's the difference between 'extends' and 'implements' in TypeScript
What's the difference between 'extends' and 'implements' in TypeScript I would like to know what and have in common and how they differ.
- Modified
- 24 Nov at 18:43
Typescript Array Map Return Object
Typescript Array Map Return Object I have the following code. Is there any way to reduce the code to something like this?
- Modified
- 11 Dec at 14:37
What is TypeScript and why would I use it in place of JavaScript?
What is TypeScript and why would I use it in place of JavaScript? Can you please describe what the TypeScript language is? What can it do that JavaScript or available libraries cannot do, that would g...
- Modified
- 11 May at 13:36
How to get names of enum entries?
How to get names of enum entries? I would like to iterate a TypeScript enum object and get each enumerated symbol name, for example: enum myEnum { entry1, entry2 }
- Modified
- 5 Oct at 01:58
Is there a way to check for both `null` and `undefined`?
Is there a way to check for both `null` and `undefined`? Since TypeScript is strongly-typed, simply using `if () {}` to check for `null` and `undefined` doesn't sound right. Does TypeScript have any d...
- Modified
- 23 Apr at 07:53
How to update TypeScript to latest version with npm?
How to update TypeScript to latest version with npm? Currently I have TypeScript 1.0.3.0 version installed on my machine. I want to update it to latest one i.e. 2.0. How to do this with npm?
- Modified
- 29 Aug at 14:51
Access template reference variables from component class
Access template reference variables from component class Is it possible to access the template access variable from the component class? i.e., can I access it here,
- Modified
- 4 Mar at 21:21
How do you produce a .d.ts "typings" definition file from an existing JavaScript library?
How do you produce a .d.ts "typings" definition file from an existing JavaScript library? I'm using a lot of libraries both my own and 3rd party. I see the "typings" directory contains some for Jquery...
- Modified
- 19 Oct at 09:1
How do I remove an array item in TypeScript?
How do I remove an array item in TypeScript? I have an array that I've created in TypeScript and it has a property that I use as a key. If I have that key, how can I remove an item from it?
- Modified
- 5 Aug at 11:4
What is the question mark for in a Typescript parameter name
What is the question mark for in a Typescript parameter name In `id?` what's the `?` for?
- Modified
- 25 Mar at 14:0
Call a global variable inside module
Call a global variable inside module I have a typescript file called `Projects.ts` that I want to reference a global variable declared in a bootstrap plugin called `bootbox.js`. I want to access a var...
- Modified
- 20 Sep at 20:19
How to use Bootstrap in an Angular project?
How to use Bootstrap in an Angular project? I am starting my first application and my basic setup is done. How can I add to my application? If you can provide an example then it would be a great help.
- Modified
- 28 Feb at 18:56
using process.env in TypeScript
using process.env in TypeScript How do I read node environment variables in TypeScript? If i use `process.env.NODE_ENV` I have this error : I have installed `@types/node` but it didn't help.
- Modified
- 19 Jul at 15:11
Angular cookies
Angular cookies I've been looking all around for Angular cookies but I haven't been able to find how to implement cookies management in Angular. Is there any way to manage cookies (like $[cookie](http...
- Modified
- 31 Oct at 17:28
Exclude property from type
Exclude property from type I'd like to exclude a single property from the type. How can I do that? For example I have And I want to exclude property `z` to get
- Modified
- 6 Dec at 09:7
How to get a single value from FormGroup
How to get a single value from FormGroup I am aware that I can get the values of a form using However, I want to get a single value from the form. How do I go about doing that?
- Modified
- 2 Jun at 06:46
Declare and initialize a Dictionary in Typescript
Declare and initialize a Dictionary in Typescript Given the following code Why isn't the initialization rejected? After all, the second object does not have the "lastName" property.
- Modified
- 8 Apr at 10:56
How to create enum like type in TypeScript?
How to create enum like type in TypeScript? I'm working on a definitions file for the Google maps API for TypeScript. And I need to define an enum like type eg. `google.maps.Animation` which contains ...
- Modified
- 5 Jan at 08:15