Category "typescript"

Custom Provider: Object literal may only specify known properties, and 'provide' does not exist in type

I'm trying to replace my logger provider in a unit test file with a stubbed provider so that I don't get logs during unit tests from the tested module. I'm gett

How can i await for file to upload so i can upload next image with params

I am using Drag and Drop file to upload multiple images. ngx-file-drop How to use with async await to upload images because i want to send params to next image

How to import DateTimeFormatOptions in

I want to store a DateTimeFormatOptions for date.toLocaleString() to use in multiple places in my app. I defined it like: export const timeFormat = { month: 'nu

Type 'AppOneType | AppSecondType' is not assignable to type 'AppOneType'

This is my current code structure: interface AppOneType { ... } interface AppSecondType { ... } interface HomeType { data: AppOneType; } interfac

Module does not provide an export named default - compiled typescript module

I'm developing a node npm module in typescript, and after I compile it to commonjs and try to import it, I get the error: SyntaxError: The requested module 'woo

Google Picker API - showing only files user can share

I would like to use the Google Picker to choose a specific file from Drive, get its id and then share it with some other accounts using Drive API. The problem i

Property 'isMounted' does not exist on type 'ErrorBoundary'

I'm practicing typescript and I've run into this bug that won't let me move forward: Property 'isMounted' does not exist on type 'ErrorBoundary'. I have the fol

How can a type of a class field that is unknown at instantiation be inferred?

Here's a class example: class Foo { item: unknown constructor(item: unknown) { this.item = item } getItem(): typeof this.item { return this.i

Interface keys from array in TypeScript

Is there a way to enforce the keys of an interface to be used from an array of strings: E.g. If we have the following array: const myArray = ['key1', 'key2'];

How to remove the selected data from saved data when we click on button in a selected one

In my application I have saved the data when we click on it(we can add the multiple data by entering some data and save the multiple data by clicking the save b

Migration from dataSource get the error: Cannot execute operation on "default" connection because connection is not yet established

My typeorm version is 0.3.6. Whenever i tried to use dataSource.runMigration() i get this error, MIGRATION ERROR:CannotExecuteNotConnectedError: Cannot execute

React native debugger: "Error: ENOENT: no such file or directory"

Problem: When I run the remote debugger, metro server says it can't find this file. Error: ENOENT: no such file or directory, open '/home/hery/Workspace/NyTiona

Cannot add cli parameters to DataSourceOptions in TypeORM

In the typeORM documentation a cli parameter can be added to DataSourceOptions according to https://github.com/typeorm/typeorm/blob/master/docs/data-source-opti

Web Crypto Api fails to verify signature after converting from string

I am storing my data, including the signature in string format, and after converting the signature to and from strings following the MDN Documentation the verif

HERE REST API - React/Typescript - OAuth Signature mismatch

I am trying to implement the OAuth authentication for HERE REST API following this documentation: https://developer.here.com/documentation/identity-access-manag

Getting error when submitting multiple file attachments to list item using sp/pnp latest version

I'm using sp/pnp to submit a list item with multiple attachments: export const CreateListItem = async (listName: string, item: any, files: File[]) => { c

How to add types to Cypress.env?

I have this cypress.json config file: { "env": { "example": "Hello World!" } } In my tests: Cypress.env("example") Can I add any kind of type defintio

Ionic 6 - localization of Google Maps API

I am using Angular 13 and Ionic 6 to add Google Maps API V3. Here is a simple example provided by Google to add the map using TypeScript. When using Ionic, I am

Assign a documents values as a <Type>

Making an Observable <Hero[]> out of a collection works perfectly and gives me access to all its documents, but I am unable to assign individual documents

Type '{ name: string; }' is not assignable to type 'ReactNode'

I want to render names that are in the State. But I get this error: Type '{ name: string; }' is not assignable to type 'ReactNode'. I understand that ReactNode