Category "typescript"

Property '$vuetify' does not exist on type - when using Nuxt.js with Vuetify

I have this error for a particular part in the code when accessing this.$vuetify in my Nuxt.js app. ERROR ERROR in components/equipment/QuickInfoCard.vue:21:

Importing JSON as a type

How do I define the type for imported json? For example { "things": "foo" } interface Data { things: String, another?: String } import data from './data

Angular testing async function generate error - 1 periodic timer(s) still in the queue

I'm trying to test that two async functions. The problem is that one of the functions is called every 10 seconds automatically. I tried to use tick() or flush()

Module parse failed: The keyword 'interface' is reserved (5:0) File was processed with these loaders

It is my first time publishing package to NPM. I have published simple React + TypeScript component to NPM, but when I installed and tested it, I am getting the

Typescript Compiler API:How to get absolute path to source file of import module using typescript compiler api

I try to get the path information as follows: const typeChecker = program.getTypeChecker(); const importFileSymbol = typeChecker.getSymbolAtLocation(

Typescript Compiler API:How to get absolute path to source file of import module using typescript compiler api

I try to get the path information as follows: const typeChecker = program.getTypeChecker(); const importFileSymbol = typeChecker.getSymbolAtLocation(

node_modules/@types/chrome/index.d.ts is not a module

I've nx monorepo having React TypeScript app. When I'm trying to use chrome in any of .ts file, VSCode is reporting a error saying Cannot find name 'chrome'. I'

convert object in to array of json with given keys [closed]

I have object like { labels: ["city A", "city B"], data: ["Abc", "Bcd"] }; I want to convert above object as below array of json [ { labels

How to map with the help of Automapper (TypeScript) the entries of an array filled with different DTOs?

I'm using the TypeScript library "Automapper" in my NestJS backend to convert an answer of MongoDb/Mongoose to an DTO. That's how the answer looks like: { "

React - Property 'data' does not exist on type 'IntrinsicAttributes & InfoGridProps'

I have a demo here I'm just trying to create a simple app where I pass data to a component and then display that data So I have the data which is an array of ob

How do I delete all unused imports in the active file with one command in VS Code (typescript)?

Previously, I used to be able to do CMD+SHIFT+p > Organize imports and this would both sort and delete unused imports. This functionality seems to have broke

Supplied parameters do not match any signature of call target - angular 4

I'm using ngx-translate in service. Exactly in this function. @Injectable() export class StartService { constructor(private translateService: Trans

Svelte - routing , When I try entering any url I only get "No webpage was found" error

Using "svelte-routing" because I need to load a single page from lots of different urls , with the different urls serving as parameters. For example if a client

React Typescript: Type issue when passing multiple refs to child component

I have a main component that passes down multiple refs to Panels component like so import { useRef } from 'react'; import Panels from './Panels'; export const

Storybook-tailwind. How should I add tailwind to storybook

I want to add tailwind to storybook. So that Stories will render just like it will render on web. I used create-react-app project-name --template typescript to

How to use mocks in tests with Adonis 5 (adonisjs/fold package)?

I have an API built with Adonis 5 (core version 5.4.0). The tests are made with Adonis' own runner, japa (version 3.1.1). As per the Adonis documentation, I bui

Control of flow in Typescript

I am trying to call a function which will retrieve data from a storage object. I need to do this and assign the returned storage value before the next function

Test Suite Failed to run

Error thrown: "Exceeded timeout of 5000 ms for a hook. Use jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test." 24 | &

how to run map function (async, fetch, promise) every second one after another and not parallel?

I have a map function here, which is supposed to fetch data from an online source. The Problem is, that the API does only allow to fetch once per second. so I t

typescript generics class, method parameter and method return type

I have this function function getCollection<T>(collectionType: T): Collection<T> { return new Collection<T>() } and in Collection class I h