Category "typescript"

how can i convert sec into hh:mm:ss format in angular2

i have tried this Time Left={{counter}} but it show me just in second format. i want in hh:mm:ss format. i want to implement his functionality in quiz timer

Exclude certain paths from being autoimported with Lerna, Typescript, and VS Code

I have a [email protected] project with a chain of multiple packages. |-tsconfig.lib.json |-packages |--format |----tsconfig.lib.json |--helper |----tsconfig.

How to handle Typescript Generics when using styled function from '@mui/material/styles'

import Table,{TableProps} from 'my/table/path' const StyledTable = styled(Table)({ ...my styles }) const AnotherTable = <T, H>(props: TableProps<T,

Ngx-datatable set column width dynamically

I'm storing the column widths of my ngx-datatable inside a database. I get these values using an AJAX call. How can I set these values for the datatable? What

Get property of generic object using keyof

I am trying to create a generic TypeScript function that recursively looks through a tree structure to find an item with a specific id value. In order to make

Filtering an observable array into another observable array (of another type) by an observable property of the items

As the title probably doesn't explain to well what I am doing, I'll give a small example: A REST api returns a list of objects. For each of them, a checkbox sh

React, Next.js and Type Script Unhandled Runtime Error TypeError: Cannot read properties of undefined (reading 'value')

I am developing a multi-page form using antd package to add some style In the main page of the form, I wrote the following code (I imported everything that I ne

Function DocumentReference.set() called with invalid data. Unsupported field value: a custom Budget object

Below code works fine until today. But I don't know now it is not working and gives below error.Could you tell me why? Error: Function DocumentReference.set

Using Google One Tap in Angular

I'd like to use Google One Tap in my Angular 11 app. Following the documentation I added <script async defer src="https://accounts.google.com/gsi/client">

How do you type hint Vue props with typescript interfaces?

Really hitting my head against a wall on this one. I remember working in Angular that TS interfaces can be used to type hint parameters. I'd like to do the sa

Formidable doesn't work outside localhost

I've made a basic file uploader website using formidable. The file uploader works on my localhost, however when other devices use my website to upload files it

How do I extend the typings of Express.Application to give typings for app.locals

In our application, we're adding quite a few config objects to app.locals that get used in our middleware. const app = Express(); app.locals = { someConfig:

VSCode how do I stay on source control tab?

I've started having an odd issue. Previous behavior (what I want): When I go to the source control tab and click a file then the comparison window opens to the

What is the 'default' part for an imported Node.js module, generated from Typescript?

In a typescript file I have a import of the filesystem and path Node modules. I use them in a pretty standard way, like: const workDir = path.join(outputDir, "

Can you compile a TS file with webpack separately from Vue application?

So I have a Vue 3 + Typescript app. npm run build of course takes the app and compiles it into the dist folder so it can be deployed. I have a web worker typesc

How to detect change from one component into other

Angular 4. Github source I have a menu which is filled by a web service. The web service is in taskService, but is not necessary now. ngOnInit() { this.

Intercepting in Multer Mutates Request? (NestJS)

Does multer mutates any request that has given to it? I'm currently trying to intercept the request to add this in logs. But whenever I try to execute this code

Ordering member for async and method in Typescript-ESLint

Is there a way for ordering async / sync method member ? example # ❌ Incorrect function myFunction() { // something code } async function myAsyncFunct

How to pretty print clean typescript errors in vscode?

I find the inline error popup in vscode useless because it's so unreadable, are there any plugins that prints cleaner inline errors?

How do I configure absolute paths for imports in TypeScript based React Native apps?

In order to avoid '../../../../' style relative imports in a TypeScript based React Native app, I would like to configure the app so that I can use absolute imp