I have the following example joi validation schema const joiUser = { firstName: joi.string().required(), // inferred type: joi.BoxStringSchema<joi.Box<
I'm running NextJS with Chakra UI and the problem is when useSystemColorMode is set to true, it ignores the user's choice on page refresh and sets it back to th
I have some code: enum Color { Red, Green, Blue } function getColorName(c: Color): string { switch(c) { case Color.Red: re
This is hardly first encounter I've had with "1 timer(s) still in the queue", but usually I find some way to use tick() or detectChanges(), etc., to get out of
When I'm trying to use spreading in typescript like: .reduce((unique, x) => { unique.some(element => element.machineName === x.machineName) ? unique
It's not essential, but I'm asking out of curiosity. In Object type we can declare optional property by using ?: operator, but is there a similar shorthand when
I've been experimenting a bit with Typescript, but I'm now a bit stuck on how to use async/await effectively. I'm inserting a bunch of records into a database,
How to navigate relative from /questions/123/step1 to /questions/123/step2 within a component using Router without string concatenation and specifying /question
I'm trying to make a project in angular but when I try to compile it shows me these errors over and over till my IDE closes. Watchpack Error (watcher): Error: E
I have a .ts file in node js (latest version of node.js for 07.10.19) app with importing node-module without default export. I use this construction: import { C
I want to test a function A that calls multiple other functions inside it which can throw errors. Here is an abstraction of my code: // file A.ts const A = (ar
I want to test a function A that calls multiple other functions inside it which can throw errors. Here is an abstraction of my code: // file A.ts const A = (ar
I need to use a jquery custom plugin in my application and how can i create a custom jquery plugin using typescript. I have googled a lot and i just got below l
Have design system created/customized with MUI v4. Decided to update to V5 using this manual. All steps are done (with codemods and manual fixes), except moving
While browsing some typescript code of @ng-bootstrap I have found pipe(|) operator. export declare const NGB_PRECOMPILE: (typeof NgbAlert | typeof NgbTooltipW
I'm creating a cloud function to read a google spreadsheets and I want that use an unlimited range. It´s that possible? The idea is read the Google spread
While browsing some typescript code of @ng-bootstrap I have found pipe(|) operator. export declare const NGB_PRECOMPILE: (typeof NgbAlert | typeof NgbTooltipW
Is there a specific idiom or utility used to filter undefined from RxJS observables? This code has the behavior I want: obs.pipe(filter(x => x !== undefined)
Is there a specific idiom or utility used to filter undefined from RxJS observables? This code has the behavior I want: obs.pipe(filter(x => x !== undefined)
Can someone explain why this: type NotEmpty<T extends string> = T extends `${any}${any}` ? T : never; declare function something<T extends string>(