I have been trying to set up an ASP.NET Core + React (TypeScript) web app project in Visual Studio 2022, but couldn't succeed in doing so. There are no proper s
Where I do declare activeIndex and how to use this variable ? I have html file: <p-tabMenu [model]="tabMenuItems"></p-tabMenu> and typescript f
I am making a project on angular 7.It has a table with a column having dropdowns. The dropdown contains various languages. When a language is selected in a part
I'm using primereact version 6.2.1, While using the calendar from primereact i have enabled the option for showTime. This brings up a datePicker with an overlay
I want to create a React component for my SVG icons but if I use this component several times (with different props) in another component, it always renders the
We use as const to narrow the types: [ {foo: 'foo' }, { bar: 'bar' } ] as const but this also adds readonly modifiers for all props and values. As of const thi
I was browsing through some code examples for Express server on GitHub and came across this function used to wrap around REST API controllers and was confused h
I have a service to get data from the backend database and display the array of objects that works fine, the only problem is I can not use it outside of the sub
I try to create an intial setup for Jest in React + TypeScript. I have completed the initial setup and try to check whether the test runs. When I run the test u
(This question has been answered for JavaScript, see below, but this question is specific for TypeScript, which behaves differently) I'm trying to use async fun
I would like to exclude all test files in tsconfig.js. Files that should be excluded *.test.ts *.test.tsx *.test.jsx *.test.js *.spec.ts *.spec.tsx *.spec.jsx *
I tried the following code: (This is my service file in angular posts.service.ts) updatePost(id: string, title: string, content: string, image: File | string)
I am new to angular, in p-calendar I'm not able to apply masking behaviour. Example: If user enters 01012012, I want to change it to 01-01-2012. Thanks in advan
I created a project with create-react-app using Typescript and latter I was asked to add next.js to it, what happend was that it broked some svgs across the app
I am trying to build a single page app using React. I came up with this hacky way to download a local file (residing in the public directory). I have two questi
I'm confused about the generic union type in Record. This is my code (TypeScript version: 4.6.3): const fn = <T extends number | string = string>() =&g
I had an error in a Typescript class method declaration, but I don't understand how the error message relates back to the bug. The message seems to be saying
I'm building a meme generator app. Here is my main component const [inputText, setInputText] = useState<InputText[]>([ { text: "", top: 30, left: 30
I'm working on a Vue project that I'm updating to Vue 3 with typescript. I've found a strange behavior with the typescript parser/compiler. I have the followin
I tried many solution from this task. I want testing axios instance api call without any libralies (jest-axios-mock, moaxios, msw, etc). I hope it's possible, b