Category "typescript"

can't resolve module inside subdirectory typescript

The module arrayGenerator.ts lies inside a subfolder, it works fine for other modules(Array.ts) inside the parent folder. But when I add a new module Sorting.ts

How to get Auth0 User object in getServerSideProps?

I am trying to use Auth0 with NextJS for user authentication. After login I want to access the user object in getServerSideProps. I followed this link below, St

How do i add typescript support to CDN version of vue?

I'm using the cdn version of vue on certain parts of my project. I want typescript support included on these parts of the project that are using vue cdn, but du

TypeORM Insert Cascade no effect

I Have a parent entity CostCenter that contains an Array of Coordinators, coordinators: Array<Coordinator> and this attribute has the typeORM annotations

Type 'Dispatch<SetStateAction<any[]>>' is not assignable to type '(values?: string) => void'

I'm very new to typescipt and trying to make a basic pin-input page. Sandbox link for my code . Although it is working, I'm getting this error for onChange func

How to test NestJs response interceptor

I tried to follow this thread but it I keep getting an error. transform-response.interceptor.ts: import { Injectable, NestInterceptor, ExecutionContext, CallHan

JSDoc equivalent to Typescript's `as const`?

I'm in an old project that is too huge to easily convert to Typescript, so I've been using JSDoc instead. The Typescript feature that I can't figure out how to

How to test CSS properties defined inside a class with react testing library

I am trying to test CSS properties that i have defined inside a class in css, wing the react testing library. However I am unable to do so. Adding the simplifie

Sending messages on Discord Bot start / on schedule using TypeScript

I've been building a Discord Bot in TypeScript for myself and a group of friends to use. I'm trying to send a message on client ready that's completely independ

How to properly write types for an array of generic React components and their properties?

I'm trying to properly type the following scenario: I have a manager/service that contains a collection of items, each item itself consisting of a React compone

Is there any way to modify the MatDialog overlay order?

I want to implement basic dialog handling in my application, with 2 functions: To close all open dialogs: Easy with MatDialog.closeAll(); Enable the user to swi

TypeScript error TS2403: Subsequent variable declarations must have the same type

I seem to be running into some compile errors on my TypeScript project. The full error is: node_modules/@types/mocha/index.d.ts:2680:13 - error TS2403: Subsequ

NestJs: Unable to read env variables in module files but able in service files?

I have an .env file at the root of my NestJs project with some env variables in it. The strange thing is that I am able to read the variables in service files

NestJs: Unable to read env variables in module files but able in service files?

I have an .env file at the root of my NestJs project with some env variables in it. The strange thing is that I am able to read the variables in service files

How to customize csv data in amcharts3 export function in Angular

I have 2 columns 1 with id and the other with a count. Now I want to add a column to display the percentage in the CSV and a heading for the file. data: [ { 0:

How to type vue instance out of `defineComponent()` in vue 3?

As you know, as of Vue 3, component could be written in TypeScript: /// modal.vue <template> <div class="modal"></div> </template> &

How to resolve rollup build error when using emotion: 'default' is not exported by @emotion\memoize\dist\memoize.cjs.js

I'm trying to build a standardized react button component for our enterprise library. I want to be able to use @emotion/styled to generate the styled react comp

Angular interceptor exclude specific urls

I am writing interceptors such that I don't have to handle the headers in every service calling my web api. The problem with this is that 99% of my calls requir

How to react to route changes on Vue 3, "script setup" composition API?

This is an example of routes I have in my application: { path: "/something", name: "SomeRoute", component: SomeComponent, meta: {showExtra: true}, }, {

Extend index signature of interface

I'm trying to extend an interface which has an index signature. However, when adding new properties that have different type, the old index signature leads to a