Category "typescript"

How do I extend the color palette from mui with Typescript

I'm trying to extend the color palette that mui provides. The overriding of primary, secondary etc colors works well but if I want to create a custom set of col

Custom React Hook typescript error on array return type

I've created a very simple custom hook: export function useI18n() : [ string, Dispatch<SetStateAction<string>> ] { const [ language, setLanguage

Angular 13: Namespace '"/node_modules/firebase/compat/index"' has no exported member 'User'. ts(2694)

1st error: Namespace '"D:/desktop/Programming/oauthAngular/node_modules/firebase/compat/index"' has no exported member 'User'. 2nd error: Type 'import("D:/desk

Custom React Hook typescript error on array return type

I've created a very simple custom hook: export function useI18n() : [ string, Dispatch<SetStateAction<string>> ] { const [ language, setLanguage

Material table datasource filter with column value

How can I filter the material data table with specific column ? public dataSource; this.dataSource = new MatTableDataSource(this.items); this.dataSo

Angular Can't bind to 'ngModel' With FormsModule already imported

Note : I'm not a front end dev, even if I do a bit of it. If anything you see can be improved, do not hesitate to share ;) Strange behavior here, I can't find o

Rollup preserveModulesRoot not working as expected

I feel like the preserveModulesRoot option while using preserveModules does not work as it should. Let's say I have a src/index.ts and a bunch of src/components

Invalid hooks call. Hooks can only be called inside of the body of a function component

Please have a look at the validate method inside the elfe-if condition in the below code. I am unable to call the useLocation method of react-router-dom. I have

Property Type Does Not Exist - MongoDB WithId<Document>

Using: ts-node: 10.7.0 MongoDB: 4.4.1 GraphQL: 16.3 I am trying to get a response back from a mongo db request. The request is successfully coming back, but typ

tslint says calls to console.log are not allowed - How do I allow this?

I just started using create-react-app with typescript create-react-app my-app --scripts-version=react-scripts-ts and the default tslint.json configuration d

Is there a way to "extract" the type of TypeScript interface property?

Let's suppose there's a typing file for library X which includes some interfaces. interface I1 { x: any; } interface I2 { y: { a: I1,

How to tell typescript, that process is not undefined?

In the following line of code: internalWhiteList = process.env.INTERNAL_IP_WHITELIST.split( ',' ) I get an error saying, Object is possibly undefined. env va

Is it possible to restrict TypeScript object to contain only properties defined by its class?

Here is my code async getAll(): Promise<GetAllUserData[]> { return await dbQuery(); // dbQuery returns User[] } class User { id: number; name

Local server won't start TS-Error Container TS2345 NodeJS?

I'm trying to run a test project on the server. Gives an error message ~/www/ork-wiki-admin-back-test $ npm run test-start > [email protected] test-

laravel Livewire wire:click not firing the function

I want to do a SPA with laravel livewire, i want to use wire:click to fire a funtion in the component but it not working , excuse me if the code mess its my fir

Angular version upgrade 8 to 9

I am updating my angular project version from 8 to 9, after resolving other build errors when i run ng serve my compilation is getting stuck at 15% building 43/

Why does the node inspector not start when I am using nodemon and ts-node?

I have a simple node server written in typescript. My package.json is configured as: "scripts": { "build": "tsc", "dev": "nodemon --watch src/**/* -e ts,js

Close menu on container scroll

I want to close the react-select menu when scrolling a container outside of the select control. There is a closeMenuOnScroll prop in the official react-select d

Cannot find module './styles.scss' or its corresponding type declarations

i install yarn create react-app my-app --template typescript yarn add sass App.tsx import styles from "./styles.scss"; function App() { return <div classN

I want to use superagent in TypeScript-ed React

I want to use superagent in TypeScript-ed React. I try to write Tutorial with TypeScript and try to use superagent when reqest server. And I faced errors to use