typescript tag

71 questions


1 answers
413 views
0
Error in TypeScript/jest combination

We are building an environment to test TypeScript alone with jest, but we do not know what to do with the following error.ttests/index.test.ts は is empty.FAIL tests/index.test.ts ● Test suite failed t...

1 years ago

1 answers
353 views
0
I want to write the Arrow function in the array in typescript.

How can I write the code below in typescript?export default class Auth extensions Vue {public rules: { username : Array < string | boolean > , password : Array < string > } = {// I don't k...

1 years ago

1 answers
444 views
0
Understanding User-Defined Guard for Two Values in TypeScript

When I tried to run the following code in TypeScriptPlayground, testFunc(a);However, there was a type error because a could be null.In order to resolve this type error, I would like to write something...

1 years ago

1 answers
367 views
0
If you try to substitute the type specified in type script, the array will not be accepted.

I write code in vsocde with vue3 and typescript.If you try to move the value from obj to itemObj after specifying the type with the following code, you get an error:typeObj={ Timeline: { Items—ItemsOb...

1 years ago

1 answers
443 views
0
I want to use TypeScript by pulling out the mold inside the associative array.

Please tell me how to pull the hierarchy inside the associative array.type Outside={ key: { a: number; b:string; }}// I want to create an inside type from an outside type key (the outside type must no...

1 years ago

1 answers
234 views
0
I would like to refill the array of TypeScript.

I am making a screen with Angular.In a component of a screen,class Sub{ constructor( aaa —string, bbb —string, ccc:string ) {}}Import the above class and get a response from the API for this type s...

1 years ago

1 answers
387 views
0
I want to implement HLS playback using rails, react-player and hls.js.

With rails at the back end and react/typescript at the front, we would like to implement the streaming playback feature using react-player and hls.js.Currently, I use a video tag to retrieve mp4 from ...


1 answers
452 views
0
Electron's Typescript+Webpack Template Cannot Run

Followed the ElectronForge page and installed the Electron template using the following command:npx create-electron-app my-new-app --template=typescript-webpackNext is npm run startWhen you run , an e...


1 answers
241 views
0
I want TypeScript to avoid undefined index access

In the code below, the object may be 'undefined'.ts(2532)Also, there is an error in the test[i].v part, but I don't know the cause at all.Is there any way to avoid writing code?//test.tstypeTestArray=...

1 years ago

1 answers
491 views
0
The method of the class of the application that I am creating in Typescript does not work as I expected.

For learning, I am creating a chess application that works with a browser using React+Typescript.The movement of a piece was able to move as I expected, but the method I made when I tried to implement...

- 1 - »

© 2024 OneMinuteCode. All rights reserved.