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
I'm using Cheerio in a Typescript project to scrape a HTML page. But I don't understand how to solve the issue : TS2683: 'this' implicitly has type 'any' becaus
I learn typescript, and I dont understand why he write in the first Function React.FC and in other function he does not write "React.FC". Why? exp: ... const Lo
I created a vue component with TypeScript, and I'm getting this error in data() and in methods(): Property 'xxx' does not exist on type 'CombinedVueInstance<
EDIT: below the line is the initial problem where I asked if my whole architecture was fine. I later edited the topic (and title) to go straight to what was my
I'm discovering Nest.js and I want to setup a cookie based authentication system with GraphQL. I already installed express-session middleware, here is the conf
I have following method in typescript, I need to bind to angular grid CountryService GetCountries() { return this.http.get(`http://services.groupkt.com/co