Questions tagged [typescript]
TypeScript is a typed superset of JavaScript that transpiles to plain JavaScript. It adds optional types to JavaScript. This tag is for questions specific to TypeScript. It is not used for general JavaScript questions.
typescript
53
questions
0
votes
1
answer
22
views
export default new TypeScript Expected 1 arguments, but got 0.ts(2554) how to fix?
Doing a QA job with PlayWright and TypeScript
Trying to avoid extra imports like defaultPage = new defaultPage(page); in spec files just to reduce lines of code and make tests little more pretty.
new ...
0
votes
1
answer
12
views
How to build a Vue web component which reflects an internal state as an attribute?
I am building a web component input which looks like this with Vue 3:
<my-input value="Search"></my-input>
How can I make sure that the value attribute is always equivalent to ...
-1
votes
1
answer
27
views
Generate object access keys from props
I have problems with dynamisation in Typescript. I know that TS works statically. However, there are sometimes situations where I want to access an object dynamically and cannot do this directly via ...
0
votes
0
answers
8
views
error NG8001: 'mytable' is not a known element
When I try to compile the front-end of my project, the following error occurs in the userList.html file. Actually, the error occurs in any HTML file located in the ./page folder, but I will use ...
0
votes
0
answers
9
views
Electron window flashes white upon showing despite graceful display
I am trying to display a window with black content inside a BrowserWindow:
changeShortcutWindow = new BrowserWindow({
height: 400,
width: 600,
show: false, // will be displayed upon ready-...
0
votes
0
answers
8
views
Non-relative paths are not allowed when 'baseUrl' is not set. Why does nuxt not set baseUrl by default?
When I cloned Nuxt github project I get the mentioned error.
This is my tsconfig.json
{
"extends": "./.nuxt/tsconfig.json",
"files": ["global.d.ts"]
}
...
0
votes
0
answers
13
views
How to disable drag and drop in Drawflow package in Angular?
I am using the drawflow package to create a workflow.
I want to disable drag-and-drop functionality from elements this demo as mentioned in the below image, not in the sidebar. In my demo, I want ...
0
votes
0
answers
5
views
Mapbox: Text of the point/circle behind is visible over the point in front
I want to show the points and to write data inside. Problem is that the data (numbers) are shown for the points behind instead of the ones in front.
I would also like for smaller number circles to ...
-1
votes
0
answers
13
views
Having issues with a messenger clone
So everything was working fine until I decided to add a header component to my messenger clone.This specific problem has returned null and crashed my application like 5-6 times. Can anyone help why ...
0
votes
0
answers
3
views
How are types generated react-relay re-used in functions and components without a GraphQL query?
I prefer to use as many types generated by react-relay for shared logic and components that do not contain a graphql query. How are these types shared without causing cyclical dependencies and long ...
0
votes
0
answers
11
views
react ts inversify doesn't work with class component
https://github.com/Lavshyak/react-ts-component-class-inversify-problem
Check render() code:
import {useInjection} from "inversify-react";
import {Bar} from "./Bar";
import {...
0
votes
0
answers
10
views
How to resolve TypeScript error: "Property 'EXPO_PUBLIC_BACKEND_URL' does not exist on type 'typeof env'"?
I'm working on a React Native project with Expo and using TypeScript. I'm trying to access an environment variable using process.env.EXPO_PUBLIC_BACKEND_URL.
"The code works correctly when I run ...
0
votes
0
answers
13
views
How can i generate the arrow function format typeorm migration file?
when ever i am generating migration file i am getting this kind of format
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "transaction&...
0
votes
0
answers
15
views
Typescript: Property 'getAll' does not exist on type 'FormData'
I'm getting non of the FormData newer function typings (entries, get, getAll...).
my tsconfig is:
{
"compilerOptions": {
...
"lib": ["ESNext", "dom....
-1
votes
1
answer
15
views
Trying to read a log file using typescript
How do I read a log file using typescript -- I've tried using fs - but it says the module is not found.
I've tried to use a promise - but then its not resolving.
should I place the test file in the ...