Questions tagged [tsx]

Extension for TypeScript files using JSX syntax

TypeScript supports embedding, type checking, and compiling JSX directly to JavaScript, as long as:

  1. Files are named with a .tsx extension
  2. The jsx compiler option is enabled

Documentation: JSX

This tag used to be about Intel's transactional memory. Use for that. See Wrong usage of the [tsx] tag on meta.

674 questions
-1
votes
1 answer

vuetify @click:append doesn't work in tsx

i tried to build a project with vue+vuetify + typescript(tsx), but @click:append didn't work in tsx. vuetify code:
Oliver Guo
  • 51
  • 3
-1
votes
2 answers

React, TSX Parsing error: Expression expected

Below is REACT code for details page Ticket is a primary object, and what i want to do is when downloading add the ticket name as .pdf filename. So i need a solution to pass the concrete ticket name to the handleDownload function In the render…
TaaviM
  • 1
  • 3
-1
votes
1 answer

TSLint unhappy with non-alphabetized import sources

I have a couple of TypeScript import sources that TSLint is unhappy about, because they are apparently not alphabetized. import { DialogNoConfigurationFile } from './view/dialogs/dialog-no-configuration-file'; import { DisplayMain } from…
Socrates
  • 8,724
  • 25
  • 66
  • 113
-1
votes
1 answer

How to Call javascript function from js file with parameter and return data from tsx file?

I have one js file as sample.js which has function like below: function checkLogin(userName, password) { var returnvalue = ''; //logic for login and assign value in returnvalue variable return returnvalue; } I want to call this function from…
-1
votes
1 answer

Running Jest tests agains Vue tsx components

I am trying to create simple boilerplate for creating Vue tsx components but have an issue with configuring Jest testing the tsx component. I was wandering if anybody have already solved similar case or could share a clue about it. Project here -…
Plamen Zdravkov
  • 748
  • 5
  • 7
-2
votes
2 answers

How to use > in react jsx?

{crumbs.map((item, idx) => { return ({item.label}) })} I want to add an optional > if idx < crumbs.length -- I keep getting parsing errors no matter what I try.
chovy
  • 72,281
  • 52
  • 227
  • 295
-2
votes
1 answer

Remix js localstorage alternative for server side

I have a remix application to act like frontend. I load data from my backend and for some data I need to load it only once and reuse it on different pages. In previous frontend we used localstorage but here is server side which returns me…
Alexey
  • 27
  • 1
  • 8
-2
votes
1 answer

Error when typing a var as a Function in TSX

I'm new to TS. I'm getting no error with this code: interface Props { active: boolean error: any // unknown input: any // unknown onActivate: Function onKeyUp: Function onSelect: Function onUpdate: Function readonly: boolean …
BobbyOrr4
  • 352
  • 5
  • 14
-2
votes
1 answer

What is the use of nesting one component into another

I am new to typescript, trying to understand one syntax that i came across data-test="Reporting" {...props} /> What is the use of OpsQL.IReportFile .Is it a constraint or something else.
pKay
  • 1,832
  • 4
  • 16
  • 23
-3
votes
2 answers

Can you use Firebase on a non-yet built mobile app?

I am planning to use Firebase for the backend of a mobile app project, and I was wondering : am I obligated to build an app to be able to use Firebase (e.g for tests) ? Or is there a way to use Firebase during my programmation phase ?
-3
votes
1 answer

How to include a JavaScript file inside a TypeScript code?

carousel.js is my JavaScript code.Its purpose is to add Events like previous and next on a carousel.How should I use it in my TypeScript?? Down below is the render method where I have used some basic HTML. public render():…
1 2 3
44
45