Category "typescript"

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

'HelmetProvider' is not a valid JSX element

I'm using typescript and react to develop dashboard. The code works fine in my laptop, but this error shows in pipeline, 'TypeScript error in App.tsx. HelmetPro

How to fix "Property XX does not exist on type 'CombinedVueInstance" errors in VSCode? (Vue with Typescript)

VS Code is reporting a lot of problems/red lines when editing my Vue Typescript files: Example error: [ts] Property 'isLoading' does not exist on type 'Combin

TypeScript(err:2532): object is possibly undefined dispite null/undefined check

I've been writing a Discord-bot in TypeScript and I added a command that retrieves information from an airport. The only thing you have to provide is the ICAO c

Is there a way to store image from the google storage buckets as JPEG locally?

So currently I have images stored in gcp storage. When I fetch an image, I receive a File object with several parameters. Being one of them mediaLink with a for

FlatList moves/drags in all directions

When I click on my FlatList I can drag and move it in all directions (up/down/right left). Although the list appears to be vertical (maybe because of the stylin