Most voted "typescript" questions
Typescript is a super superset of Javascript created by Microsoft that adds optional types, classes, interfaces and modules and compiles for pure Javascript.
Learn more…1,167 questions
Sort by count of
-
-1
votes0
answers12
viewsonScroll with Styled-Components + Typescript
I have a problem to use onScroll event with Styled-Components + typescritp. It happens to the following error message: 'No overload matches this call. Overload 1 of 2, '(props:…
-
-1
votes0
answers12
viewsI am unable to update my Angular table
Guys I’m having a question here, I’m trying to update my table but it’s not updating, says it’s updating but it doesn’t update. Service: updateCliente(cadastro: Cadastro): Observable<any> {…
-
-1
votes0
answers17
viewsHow to take a useState from one screen and use it on another screen in React Native?
Guys, I’m making an app for college in React Native and I used a useState to get the name of the user on the screen of Signin, but I don’t know how I can take this name and use in other screens in…
-
-1
votes0
answers9
viewsHow to update the list on screen - Picklist (Angular)
HTML <app-navbar actor ="cord"></app-navbar> <h1 class="center">Gerenciar Áreas de Atuação</h1> <div class="largura"> <p-pickList [showTargetControls]="false"…
-
-1
votes0
answers4
viewsValidation and rendering of a field if a particular option of the select is selected (React-Hook-Form and React-Select)
I need the user select the option "Promotions" in select, the field "Promotional price" is mandatory completion and the display his block. Here’s how I’m trying to do it: const { register,…
-
-2
votes1
answer757
viewsERROR Error: Uncaught (in Promise): Typeerror: Cannot read Property 'src' of null
I want to take the "src" of an html image but keeps showing this error. I’m trying to do it this way import { NavController, NavParams } from 'ionic-angular'; import { Component } from…
-
-2
votes2
answers3399
viewsAdd a new literal object to an object array!
I would like to add a new item to my object array through a method, but I don’t know how to do it. public products: Array<Object> = [ {prodName: 'product 1', prodElement: 'element 1',…
-
-2
votes1
answer91
viewsAngular for creating layout
Good morning guys! I am starting to study now angular, Node and typescript (not in that order) and I have arisen the following doubts: 1- I noticed that to run the angle, you usually use Node for…
-
-2
votes1
answer319
viewsActivation of Angular Formgroup validation
Hello I have a form using formGrupo! When I click the confirm button it does not perform the validations, without any reaction in the fields...... However, I would like that when I click on this…
-
-2
votes1
answer274
viewsHow do I remove accents and replace spaces with: _?
I got this guy: this.logger.logButton(`${this.selectedRadio.title}_${this.selectedRadio.cidade}`, { pram: 'paramValue' }); his return comes for example: Rádio Mix_São Paulo I wish the return was:…
-
-2
votes2
answers1130
viewsAngular 7 - Creating a Stepper/Wizard
I’m doing a sign-up page, which is working. I wanted to change her to a Stepper/Wizard, but I’m using Angular 7 with Bootstrap 4. Has anyone ever done one or has an angle example?
-
-2
votes2
answers545
viewsAlgorithm for calculation of residential or industrial power consumption in javascript or typescript
Hello colleagues of profession, I am creating a component in Angular(5+) in which I need an algorithm to perform this calculation of energy consumption In case the power option is selected I inform…
-
-2
votes1
answer177
viewshow to load the app.component.ts only after logging in
I am creating a menu for my application Ionic 3, and I came across the following problem: In this menu I bring data from the user coming from the database, these data I load in the app.component.ts,…
-
-2
votes1
answer62
viewsIs it possible to pass parameters from one application to another via Query String? Angular 2+
I have 2 applications Angulas, Application 1 and application 2. I need to pass via query string the token of application 1 to application 2. Does anyone have an example? I am lost and found nothing…
-
-2
votes1
answer93
viewsWhen recording caught a bad request using angular 6
When I try to record in the bank, I get error (400) bad request, when I insert by Postman two fields of the type of an object returns an empty array([]). I’m sure the sending of the data is wrong,…
-
-2
votes2
answers77
viewsView foreach result out of it
Is there any form of data forEach be viewed outside the forEach? I need to see the data from forEach out of it, but every time I do it it only returns the last data, not all data. I have tried using…
-
-2
votes1
answer257
viewsAngular with JSON + Typescript
Should I read a JSON and print the results inside a dynamically angled HTML. The site would be a kind of chat where I have tags with dynamic DATABIDING, within the <ul class="list-group row">…
-
-2
votes1
answer366
viewsOperating a delete operator needs to be optional
I set up a Node server, and when I went to do the tests to get up to production I saw that Eslint was accusing me of an error: Just for the record, it’s working as due, delete is removing the…
-
-2
votes1
answer38
viewsProblem with typescript paths
Hello, I am using the Airbnb Eslint configuration and it is giving an error in typescript paths.…
-
-2
votes5
answers2360
viewsTypescript error Property 'user' does not exist on type 'Request<Paramsdictionary, any, any, Parsedqs>'
How can I fix the error Property 'user' does not exist on type 'Request<ParamsDictionary, any, any, ParsedQs> I created a @types folder at the root, inside it had a file express.d.ts with the…
-
-2
votes0
answers24
viewsstring outside the console.log is not recognized
Because _message.content.toString() outside the log console is not being recognized as a string If I put name = 'string' it brings the search result if I use _message.content.toString() it comes…
-
-2
votes0
answers7
viewsHow can I convert QUERY to TYPEORM functions
TABLE subjects id, course_id, Subject, subject_name, created_at TABLE Ourses id, source, name, info, created_at I have this function that searches the following fields .query(`SELECT subjects.id,…
-
-2
votes1
answer41
viewsHow do I disable two buttons at once? ANGULAR
I have two buttons that their ID comes from a database die: <tr *ngFor="let dads of DadosOs"> <td><button type="button" class="btn btn-success but" id="{{dads.NUMOS}} - A" value =…
-
-2
votes2
answers355
viewsAngular - Page without showing previous components
I’m new at the angle, accustomed to HTML href and just open another page, let’s get to the problem! 1 - I have a form asking for the name and a button of Ubmit 2 - I have another component which is…
-
-2
votes1
answer121
viewsMat-Angular-Stepper how to go to the next step through typescript?
I’m trying to give the next through a function. I saw in the documentation that they possess the method next() But I tried to stop both the matStepper as to the matStepperHorizontal in my…
-
-2
votes1
answer104
viewsPegcity does not exist in type 'string'
This code below is from the one page delivery.ts file in Ionic 3.9 Neighborhood and city are data taken from an api on the localhost Two errors are presented to me that I don’t know how to solve:…
-
-2
votes1
answer463
viewsTypescript error: Cannot find module 'os'. how to resolve?
app.component.ts import { Component, ViewChild } from '@angular/core'; import { Platform, NavController } from 'ionic-angular'; import { StatusBar } from '@ionic-native/status-bar'; import {…
-
-2
votes2
answers206
viewsIterate an object within another. Is it possible?
let myObject = { nome: 'Nome', idade: 20, endereco: { rua: 'Tal', numero: 5, municipio: { codigo: 1, ibge: '001' } } }; Object.keys(myObject) .forEach((key) => { console.log(key); // 'nome',…
-
-2
votes1
answer72
viewsUse custom folder directive
I created this directive inside a directive folder app |_ diretivas |_ click-outside.directive.ts My directive is like this: import { Directive, Output, EventEmitter, ElementRef, HostListener } from…
-
-2
votes1
answer197
viewsHow to receive an array of data from my Ionic Storage
I need to send some data to my php that will handle them and send to my Cpanel database. In my code, I can correctly save the data I want (image, latitude and longitude) in the Ionic Storage and…
-
-2
votes1
answer92
viewsCalculate birthday date in typescritp
I’m developing a freelance system for a college job and I’m having trouble calculating date. I have a date field (for date selection) and another blocked label that will bring the result (age )…
-
-2
votes2
answers559
viewserror running npx React-Native run-android command
Create a new project in React Activate with tamplete in typescript and while running the android Yarn command or even the npx React-Native run-android I am getting the following error: error Failed…
-
-2
votes1
answer59
viewspush javascript == Undefined
I’m trying to send an object inside a arrey to get a sequence of objects but when I use the push it error function saying that Undefined I’ll leave the codes below: objectArrey: Object[] //esse é a…
-
-2
votes2
answers107
viewsError in searching collection points
Last week I followed Next Level Week, which brought the idea of creating a system for Mobile and Web, the web part I was able to do, all according to the video. but I have a problem so far in the…
-
-2
votes1
answer497
viewsAngular 8 scroll manipulation
I am developing a component in Angular version 8 and in the html part of the component I am using the following navbar: https://bootsnipp.com/snippets/kl8Q3 but when I try to embed javascript in my…
-
-2
votes1
answer72
viewsAngular - How to reuse information from one component in another to realize condition?
I have a menu in my html component as follows: (Menucomponent.html) <p-tabMenu class="tabMenuDrograria" #menuItems [model]="items" [activeItem]="items[0]"…
-
-2
votes1
answer38
viewsTypescript function, bring the user response to the screen after clicking
Hello. Guys I have a function where I press 3 color buttons (yellow, blue, black) on my screen, I need that when I click these buttons on a div below appear the colors that he is clicking. So the…
-
-2
votes3
answers71
viewsHow to take larger amount of each product and show within a list from the largest to the smallest?
How do I pick up quantities and show all the smallest amounts of that amount within ul (list) of different objects? As for example, the first item has 5 quantity, I would like to show within a list…
-
-2
votes1
answer37
viewsArray objects in angular
I’m doing it this way to fill the array: let form1 = this.formGroup.get('array_activity') as FormArray; console.log(form1); if (!this.data.isEdit) { for (let i = 0; i < form1.controls.length;…
-
-2
votes1
answer98
viewsAdd database data from an Array in Nodejs using typescript
I am developing an Application in Nodejs that has the following entity: import User from '@modules/users/infra/typeorm/entities/User'; import { Entity, Column, PrimaryGeneratedColumn,…
-
-2
votes1
answer43
viewsShow array first element that may not have been loaded using React
I am developing a quiz application using React for study purposes. I have the state called Quiz, the same consists of: interface QuestionData { id: number; question: string; explanation: string;…
-
-2
votes1
answer88
viewsconst returns Undefined when using the getServerSideProps method of Next.js
Hello, I am using React with Next.js and using the native Next.js method, getServerSideProps to retrieve browser cookies. It turns out that the breakdown works for the first const, but not for the…
-
-2
votes2
answers78
viewsExclude element from a dynamic object array
I need to delete a column from a dynamic object array. Example: export interface ObjetoTeste { primeiraColuna: string; segundaColuna: string; } let teste: Array<ObjetoTeste> = [ {…
-
-2
votes1
answer40
viewsHow to take the current value of a select with angular
import { MatchService } from './../match.service'; import { Router } from '@angular/router'; import { Component, OnInit } from '@angular/core' import { Match } from '../match.model'; import…
-
-2
votes1
answer44
viewsDelay or not sending the data to the back-end, what to do?
I have a ready front-end of a registration form, but they are working as follows: I do all the registration and when clicking on the button it calls the function that takes the values of the fields…
-
-2
votes1
answer23
viewsHow do I pass a parameter to an external function from within the STYLED-COMPONENTS using Reactjs with Typescript?
PS. The idea here is not to use the parameter directly in Styled: opacity: ${(props) => props.myArr[0].myOpacity)} . The idea would be: Pass a parameter (myArray) of any component for a…
-
-2
votes0
answers17
viewsStates in Angular2+
I am having doubts about how to modify a state at the angle. I am using Zorro filterSelect, so I have to modify this.filterEquipe to disable or enable the field export class MainDashboardComponent…
-
-2
votes0
answers23
viewsHow to put the icon to see the password inside Inputoutline
I wonder how I can put this icon inside my Password Inputoutline: Here is the code of Inputoutline: [..] return ( <SafeAreaView style={styles.formContext}> <View style={styles.txtEmail}>…
-
-2
votes0
answers27
viewsHow to create an interface or generic type for an object where all its properties are functions with different arguments in Typescript?
Let’s say I have these objects: const actionsPost = { likePost: (id: number) => dispatch({type: Actions.like, payload: {id}}), addPost: (title: string, body: string) => dispatch({type:…
-
-2
votes0
answers23
viewsAsync/await not working in React typescript (Hooks)
I’m running a route-fed authentication. But this not respecting the await of the post in the login api. Sometimes it works locally but most of the time it "skips" the post. import React, {useState}…