Category "typescript"

laravel Livewire wire:click not firing the function

I want to do a SPA with laravel livewire, i want to use wire:click to fire a funtion in the component but it not working , excuse me if the code mess its my fir

Angular version upgrade 8 to 9

I am updating my angular project version from 8 to 9, after resolving other build errors when i run ng serve my compilation is getting stuck at 15% building 43/

Why does the node inspector not start when I am using nodemon and ts-node?

I have a simple node server written in typescript. My package.json is configured as: "scripts": { "build": "tsc", "dev": "nodemon --watch src/**/* -e ts,js

Close menu on container scroll

I want to close the react-select menu when scrolling a container outside of the select control. There is a closeMenuOnScroll prop in the official react-select d

Cannot find module './styles.scss' or its corresponding type declarations

i install yarn create react-app my-app --template typescript yarn add sass App.tsx import styles from "./styles.scss"; function App() { return <div classN

I want to use superagent in TypeScript-ed React

I want to use superagent in TypeScript-ed React. I try to write Tutorial with TypeScript and try to use superagent when reqest server. And I faced errors to use

NPM package cannot be used as a JSX Component - Type errors

Ive been getting these strange type errors on my typescript project for certain packages. Ex: 'TimeAgo' cannot be used as a JSX component. Its instance type '

React 18 TypeScript children FC

I upgraded to React 18 and things compiled fine. Today it seems every single component that uses children is throwing an error. Property 'children' does not exi

SAM local start-api CORS issue

I am using AWS CDK (Typescript) and running SAM local start-api to spin up an API tied to lambda resolvers and am running into a CORS issue when trying to hit t

Jest beforeAll vs beforeEach unexpected behaviour

I have a quite simple test, basically I'm trying to mock i18next's t function: import { t } from 'i18next'; import { changeDocumentTitle } from './utils'; jest

target in tsconfig.json setting not working but command works?

{ "compilerOptions": { "target": "es5" } } I have tsconfig.json as above, and when I run command tsc app.ts --watch, I hit error Accessors are only av

Yup / Formik validation using dynamic keys

I am trying to validate a form with a dynamic amount of fields - i.e., data is returned from an API that determines how many rows are shown, and for each row th

react-dom installed, but not found. `Could not find module in path: 'react-dom/client' relative to`

Here is the Codesandbox I want to run a rest, but the Tests tab shows this error. Could not find module in path: 'react-dom/client' relative to '/node_modules/@

How to use Promise.all() with Typescript

Here is what I want to do: Promise.all([aurelia.start(), entityManagerProvider.initialize()]) .then((results:Array<any>) => { let aurelia:

Attempted import error: 'Wallet' is not exported from '@project-serum/anchor'

Trying to import the Wallet class but getting error in title at runtime. This issue apparently should have been fixed in v0.21+ but it doesn't appear to work in

I can't get "Typechain" folder when I install dependencies using hardhat

When I install all the dependencies but didn't get the "typechain" folder in the typescript hardhat. how to get it? npm init npm install --save-dev hardhat npx

Angular Material 2 table server-side pagination

I am trying to Achieve Angular Material 2, MatPaginator server side paging. How can I achieve that? Below is the code example: <div class="example-contai

enforce property order in a typescript interface

I am building a typescript interface to an API that I do not control. The API is xml based and expects properties in a particular order. These properties are no

Compile tailwindcss + typescript

I have a very simple app with some html, css, and ts files. I use swc to compile the typescript and copy over the html/css/assets. Now, I'm looking to add tailw

How to make one object type which will contain properties of all objects of union type, but values will are intersections

How can I make a type which will make a one object type from unions of objects, which will contain properties of all objects of union type, but values will inte