Category "typescript"

Unicode characters in Angular binding

There are some answers on how to display Unicode character codes in Angular bindings, but I'm trying to display one dynamically and everything seems to fail. I

How use UseRef to show popover just above the pressed element in React Native?

I am using the Flyerchat library for the chat application. <Popover isVisible={open} onRequestClose={() => setOpen(false)} from={t

ANSI escape codes not moving cursor horizontally

I am trying to make a text editor in the terminal with node and typescript but the ansi escape codes aren't moving the cursor horizontally. THe cursor moves ver

How use UseRef to show popover just above the pressed element in React Native?

I am using the Flyerchat library for the chat application. <Popover isVisible={open} onRequestClose={() => setOpen(false)} from={t

React Native TypeScript Error: Module '"react-native"' has no exported member 'Appearance'

I've recently implemented dark mode into my app, but having an issue with an error when building the npm package with npm build. The code works, but is there a

Beautify Xml with Angular

I'm trying to beautify a xml throught the package avaible in npm repositories (vkbeautify and xml-beautifier) to display into the html but is not working (I tri

nest.js build throwing a lot of errors

I have this Nest.js app running and setup for a while and, out of a sudden, it started reporting this when I run npm run build. node_modules/@nestjs/config/dist

Dynamically update doughnut chart with NG2Charts

I am working on a project where I am making a calculator of macronutrients. I have a form to enter the values and it displays a doughnut chart, with its initial

Type '{ author: Author; }' is not assignable to type 'IntrinsicAttributes & Author'

I am totally new to TS and react and I ran into a problem. I tried searching many places and can't seem to fix it. The whole error message is: Type '{ author: A

js/ts translate internal commands

I am currently trying to translate some text-based console-log processing into JSON format. Console.log commands: give ENTITY.name = "entitytest"; give entity.u

Guard factory in nestJS application

I'm trying to create a guard factory in order to create a guard based on given params and ran into an issue. I built the following factory @Injectable() export

How to create a UUID template literal type in Typescript?

Did anyone suceed in writing a type for UUID in Typescript using the new template literal types? e.g.: const id:UUID = "f172b0f1-ea0a-4116-a12c-fc339cb451b6" T

ESlint complaining about useless constructor

I'm getting ESlint error in this file Bar.ts: class Bar { constructor(public foo: string) {} hello(): string { return this.foo; } } export default B

How do I use the node-tree-sitter module from typescript?

From looking at pull requests & issues I see there are typescript definitions (possibly currently out of date) in the node-tree-sitter module; how do I acce

Is there a way to use configService in App.Module.ts?

I am building RESTful service with NestJs, I have followed the example to build configurations for different environments. It works well for most code. However

Angular get all console errors

I'm trying to catch all console errors of my Angular aplication, not only the http response error, but also those that are generated in the application. I mean,

relative paths for outDir and rootDir in a base tsconfig.json

I have a base tsconfig.json where I want to have all consistent properties for all projects that reference it. I was hoping I could persistently put the outDir,

Property 'create' does not exist on type { new (fileBits: BlobPart[], fileName: string, options?: FilePropertyBag | undefined):File; prototype: File}

I'm trying to create a file-sharing app using Multer, Cloudinary, Typescript, and Mongoose. When I'm trying to save the files uploaded by users and the data lik

Jest SpyOn choose the correct overload

I do have a class that has 2 overloaded methods. public static create<M extends Model>( this: ModelStatic<M>, values?: M['_creationAttribu

React-native & typescript: <ImageBackground> component, property 'children' does not exist on type 'IntrinsAttributes &...'

I am struggling to understand why typescript giving me this error message when I use <ImageBackground> and <Image> component from 'react-native'. er