Category "typescript"

ESLint: 8.0.0 Failed to load plugin '@typescript-eslint'

Could you help me, I've got this error when I try building a project? Oops! Something went wrong! :( ESLint: 8.0.0 TypeError: Failed to load plugin '@types

Synchronously iterate through firestore collection

I have a firebase callable function that does some batch processing on documents in a collection. The steps are Copy document to a separate collection, arch

Could not find a declaration file for module 'vue-xxx'

Any 3rd party Vue.js library that I try to add to my project, throws the following error: Could not find a declaration file for module 'vue-xxx' I have tried

React: How to solve 'Spread types may only be created from object'?

I am trying to create a handler method in React, but I'm getting a typescript error with spread operator. Could someone help with this error please? I did follo

Angular 5 - Copy to clipboard

I am trying to implement an icon that when clicked will save a variable to the user's clipboard. I have currently tried several libraries and none of them have

How to include a global file type declaration in a TypeScript (Node.js) package

I'm working on a package that I am planning to publish publicly on npmjs. Let's call it the "text package". I would like that by default when installing that pa

How to build a TypeScript class constructor with object defining class fields?

In TypeScript it's possible to create a class with a constructor that takes parameter with access modifiers and it automatically convert those parameters in cla

Why are logical assignment (&=) operators disallowed in Typescript?

With the following code: var x:boolean = true; x &= false; Results in error TS2447: The '&=' operator is not allowed for boolean types. Consider usi

Object is possibly 'null' (undefined)

See, this is my code and it is saying few errors, which are: Object is possibly 'null', Property 'style' does not exist on type 'Element'. It is very irritating

NestJS and Serverless - handler 'handler' is not a function

I am trying to implement NestJS as a AWS Serverless function using serverless-framework. I was following this official documentation and my code is exactly as i

Resolve Error: typescript with invalid interface loaded as resolver ESLint

I'm having ESLint in my project and getting an error Resolve Error: typescript with invalid interface loaded as resolver : import-no-restricted-paths when I ad

How do I compile Typescript at Heroku postinstall?

Instead of uploading the precompiled dist directory, I want to compile src at server side instead. Here are my scripts inside package.json: "scripts": { "

How to fix NextJS webpack error: You may need an appropriate loader to handle this file type, currently no loaders are configured

I generated NextJS project using TypeScript template and I want to add my Storybook to the project. Storybook is written in TypeScript. When I'm adding Storyboo

Typescript: add instance of external dependency to window object

I am integrating an external dependency into an Enterprise project. The integration goes like this: window.foo = new Foo({ container: `#${iframeContainer

How to break/continue across nested for each loops in TypeScript

I tried to use break inside nested for each loop and it says jump target cannot cross function boundary. please let me know how can i break nested for each loop

ERROR TypeError: Cannot read property 'slice' of undefined---Typescript

how are you? I have one problem 'slice' of undefined in my project. I use autocomplete material https://material.angular.io/components/autocomplete/examples M

Is there anyway to get types interfaces for request, response in Nest.js with Fastify

I am learing Nest.js and on the beging of documentation I read that I can use it not only with express but also with fastify so I setuped up my first project wi

NestJS Share e2e server between test suites

I'm using NestJS test module to mock the nest app and I want to share this app among various test suites. Here's my setup: test |_ helpers |_ testApp.ts

ESLint configuration with typescript jsx

I am having issues with configuration with typescript. Here is my following code in tsconfig.json: { "compilerOptions": { "target": "es5", "lib": [

Consider using the "jsdom" test environment

I have this simple test: import React from 'react' import { render } from '@testing-library/react' import Button from '.' describe('Button', () => { it('