Category "typescript"

How should Vue filters be bound using typescript?

How should Vue filters be bound using TypeScript? It is fairly straightforward with pure js, but I'm running into issue converting it to TypeScript. The code an

Javascript file upload e.target == null when choosing another file after initially chose one

I've currently implemented the file uploading using <input> and for some reason when I try to change the file after already chosen the file. The website w

Use Enum as restricted key type in Typescript

The question is can enum be used as a key type instead of only "number" or "string" ? Currently it seems like the only possible declaration is x:{[key:number]:a

Reconnecting a websocket in Angular and rxjs?

I have a ngrx/store (v2.2.2) and rxjs (v5.1.0) based application that listens to a web socket for incoming data using an observable. When I start the applicati

Cannot approach Typescript enum within HTML

I made an enum with Typescript to use in MyService.service.ts MyComponent.component.ts and MyComponent.component.html. export enum ConnectionResult { Succ

Add functions to an Enum

Is it possible to add functions to an Enum type in TypeScript? for example: enum Mode { landscape, portrait, // the dream... toString() { co

How to loop though Record<K, T>

I have Records type of Record: export interface List { name: string; title: string; } export type RecordType = 'recordOne' | 'recordTwo' | 'recordThree';

useLazyQuery not being called after onClick

I'm trying to check if my user isLoggedIn with a query from GraphQL API data from the user if it's loggedin if not it's supposed to return undefined or some err

Copy plugin for esbuild "is not a function"

I'm working on an esbuild configuration and want to copy a file (manifest.json) to a specific folder when I build my project for testing purposes. I included th

Unable to generate Cucumber HTML reports on failure

I have created a project framework using Typescript and Cucumber BDD approach. The executions within the project are working and the cucumber html reports are a

Angular: Swiper carousel is not working - Error: node_modules/swiper/angular/angular/src/swiper-events.d.ts

I am trying to create a carousel in angular using swiper (https://swiperjs.com/angular). I get this error: Error: node_modules/swiper/angular/angular/src/swiper

How to verify certificate chain in Flutter?

I have a mobile app written in Flutter that stores an intermediate cert. Other mobile clients can send certificates to this device and it should decide whether

TypeScript isNan only accepts a number

I work with WebStorm 2016.2.2, TypeScript 2.1, Node.js. For some reason, isNan is declared as a function that only accepts a number: declare function isNaN(nu

How can I define an interface for an array of objects?

I have the following interface and code. I thought I was doing the definitions correctly but I am getting an error: interface IenumServiceGetOrderBy { id: numb

Is it possible to validate that one of 2 parameters are present using class-validator?

Using class-validator along with NestJS I want to validate that a user provides either propertyA or a propertyB but they don't need to provide both. Currently,

How to get file contents from ipfs-http-client

I am using ipfs-http-client to read the contents of a file form infura, how do i use the "cat" funtionality to correctly get the data in a string/json format?

Eslint not working with the TypeScript syntax

I am trying to configure eslint for my REACT-TypeScript project. It was previously using tslint which is going to deprecate soon. I have gone through the web an

Anyone has experience using NightWatch with TypeScript?

I am using NightWatch for my e2e testing and want to move towards ES6 way of writing tests. I was able to do it with Babel and it worked fine but I want to use

Getting "Types of property 'accessibilityRole' are incompatible" error

Am getting typescript error when i extend th TextProps from react-native and pass it to the Text component created by styled-component Overload 1 of 2, '(prop

How do I import Pixi.js into a TypeScript project?

I'm new to Pixi.js but I have some past experience with TypeScript. I'm really struggling to import Pixi.js into my project. I got a small Pixi.js project runni