365体育足球滚球比分

Dark mode beta

You’ve been asking for dark mode for years.
The is finally here.

Change your preferences any time.

Questions tagged [typescript]

TypeScript is a statically typed superset of JavaScript created by Microsoft that adds optional types, classes, interfaces, enums, generics, async/await, and many other features, and compiles to plain JavaScript. This tag is for questions specific to TypeScript. It is not used for general JavaScript questions.

Filter by
Sorted by
Tagged with
1
vote
0answers
6 views

I want to create a generic function that return either value of same T or value of different R

I would like to understand how to get where I want with generic type so this is my example : function foo(value: 42 = 42 ,bar:(val: any) => any = I => I){ return bar(value) } I work with a ...
1
vote
0answers
4 views

specify different development and production tsconfig file in webpack depending on NODE_ENV

I have two different files tsconfig.dev.json and tsconfig.prod.json and I'm trying to switch between these depending on whether webpack is run in development or production mode (-d/-p). Here is my ...
1
vote
0answers
5 views

Which TypeScript transpiling flow is for what case?

I am looking at how TypeScript may be used in projects and I see multiple ways for doing this: Babel with TypeScript preset + WebPack TypeScript compiler with + Babel for generated JS + WebPack ...
1
vote
1answer
20 views

how can we add link in angular 8?

I would like to add a link on Angular 8 but I don't know how to do it. example link : http://parayshelties.com I use routerLink or app-routing.module ? <div class="background-color"> <h1&...
0
votes
0answers
5 views

Ionic Back Button - How to trigger an action, extending a class in TypeScript

I'm trying to do something easy to implement in my Angular/Ionic project at global state to handle corretly Back Button action. Currently: I have to enter in each component to configure the action ...
0
votes
0answers
6 views

Syntax error in library code when including matrial design using Rails + Webpacker + Typescript + Angular

In my rails app, I get a syntax error somewhere in a huge js file that is presumably generated by webpacker. But it seems to be some sort of angular/material code. If I don't include material design, ...
1
vote
1answer
17 views

adding an image background to a button component in React Typescript

I'm using a material UI library in a React project using react typescript. I want this button to have a picture as a background. However, the button does not accept src or imageURL and returns a ...
-2
votes
2answers
23 views

Variable changed inside arrow function not changed when consoled outside the arrow function

I am working with angular and typescript and want to change the value of the variable inside the function. I am using a service to get the data. The code is shown below: isValue:boolean = false; ...
0
votes
0answers
7 views

WebStorm latest 2019.3 and Angular 9. getting Cannot find module errors

After upgrading to Angular 9, I keep getting errors in TypeScript error console... but no errors exist when i run tsc in command line Package Version. my tsconfig { "compileOnSave": false, "...
0
votes
0answers
12 views

Generate form Input field as per selected number from dropdown

I have written an Angular TypeScript code to show the employee-profile. In that there is a drop-drop down field to select number of children. I am able to show the the number of children prefilled ...
0
votes
1answer
22 views

How can I create an instance of an angular service on the fly?

I need to create some angular services on the fly. I cannot wrap my head around how to work with DI and the http service. Please help! import { HttpClient } from '@angular/common/http'; export class ...
0
votes
0answers
11 views

skip interceptor handlers if there was an error in the response

The problem. When I invalidate refresh token on the server, and comes the refresh token request, I receive the following warning: You provided 'undefined' where a stream was expected. You can provide ...
0
votes
1answer
19 views

Typescript: property based on another property

I have a situation of nested types and what I would like to achieve is to have a specified property based on another property's value. In the HTML I cycle the response of an API and, based on the ...
0
votes
1answer
10 views

Type 'DefaultClient<unknown>' is not assignable to type 'ApolloClient<object>'

I am trying to explicitly supply a client to useMutation. Everything works fine except for the fact that typescript seems to see a type mismatch. Type 'DefaultClient<unknown>' is not ...
0
votes
4answers
27 views

Value of Observable is not displayed when it is 0 (Zero)

Using Angular 8, I have the following: <ng-container *ngIf="(count$ | async) as count; else loader">{{count}}</ng-container> <ng-template #loader> loading </ng-template> ...

15 30 50 per page
1
2 3 4 5
7238