Category "typescript"

Types for tailwind

I am using tailwind.config.js in order to extend some colors: const theme = { mode: 'jit', content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'], darkMo

Vendor Machine API's Postman Collection Issue

I am trying to create a postman collection for a Vendor machine API but when I try to send a login request localhost:3000/auth/login I get connect ECONNREFUSED

Make a single property optional in TypeScript

In TypeScript, 2.2... Let's say I have a Person type: interface Person { name: string; hometown: string; nickname: string; } And I'd like to create a

Spy on the result of an Observable Subscription with Jasmine

I am Jasmine unit testing an angular component, which uses Observables. My component has this lifecycle hook that I am testing: ngOnInit() { this.dataService.

Error: Child Compilation failed - Module.createRequire is not a function

I have worked on a React/Typescript application on my Mac Machine, and zipped up the application (including node_modules) and emailed it to a colleague via Goog

An index signature parameter type cannot be a union type. Consider using a mapped object type instead

I'm trying to use the following pattern: enum Option { ONE = 'one', TWO = 'two', THREE = 'three' } interface OptionRequirement { someBool: boolean;

Type 'FileOriginal' is not assignable to type 'Provider' when trying to use Native File in Ionic

I'm attempting to use PDFMaker for my Ionic 5 project. 1 prerequisite is to use the Native File and FileOpener. When I try to import the module, I get the below

make .d.ts for external library file available for project

I have a closed-source plain JS library that will be included via a <script> tag pointing to a CDN. I would like to author my own type definition file for

How to add multiple components into one story using Storybook?

I just started using storybook, and I need your help. I've four components for the different icons, and I want to create one story for all of them instead of cr

Access raw body of Stripe webhook in Nest.js

I need to access the raw body of the webhook request from Stripe in my Nest.js application. Following this example, I added the below to the module which has a

React Native render error Value is undefined expected a object

So I dont know why I am getting this weird error and I am unable to find any solution for it so plz help with me Error Code import React, { useRef, useState

Appending .js extension on relative import statements during Typescript compilation (ES6 modules)

This seems to be a trivial problem, but it is not very obvious what settings/configurations need to be used to solve this issue. Here are the Hello World progra

Angular 6: simple confirmation on page leaving

I need to make a simple confirm window and I saw a lot of examples of how to do it with extra actions (like waiting until file uploading of form is not field).

Typescript error "Cannot write file ... because it would overwrite input file."

In my Typescript 2.2.1 project in Visual Studio 2015 Update 3, I am getting hundreds of errors in the error list like: Cannot write file 'C:/{{my-project}}/

Typescript module not found error after compilation

This has been driving me crazy. How can I get typescript to compile the imported module correctly? My main.ts has import { AddListeners } from './listeners'; wh

Is it possible to create tables within Angular ts files?

So I have an array which holds different categories to compare different companies. Depending on the user selection there may be 3 categories or 10 to display.

Angular2 Typescript Customized Alert

I am totally new to Angular2, And I am stuck on how to create an customized alert like this: check this alert box here Since I am new to Angular2 concepts , I

ts-node-dev not restarting when changes made

Here are my files : package.json : "scripts": { "generate-interfaces": "ts-node src/cli/generate-interfaces.ts", "dist": "npm run generate-interfaces &&

pass an array of objects to a dropdown (select) using typescript

I'm trying to pass this array of objects options = [ {label:'React', value: 'react'}, {label:'ReactNative', value: 'react-native'},

Ion-datetime min/max for hours doesn’t works

I'm trying to implement a min and max attributes for datepickers. So i have two datepickers, one for start and another for the end, both just pick hours and min