365体育足球滚球比分

Questions tagged [typescript]

365体育足球滚球比分 TypeScript is a statically typed superset of JavaScript created by Microsoft that adds optional types, classes, interfaces, enums, generics, async/await, and many other features, and compiles to plain JavaScript. This tag is for questions specific to TypeScript. It is not used for general JavaScript questions.

Filter by
Sorted by
Tagged with
0
votes
0answers
4 views

Why is component able to be access even if not in declaration of any module?

I have PageNotFoundComponent which I have not declared in any modules. Yet I have included it in a routing module to ensure that when we have no matching route this component will be in the router-...
0
votes
0answers
9 views

Conditional Styling use react-jss with Typescript

Incorporating JSS via react-jss in a large project. I'm wondering what the best way to handle conditional styling via props is. For reference this is what my component props look like: buttonType?: '...
0
votes
0answers
10 views

Property 'find' does not exist on type 'arrPostType'

There was a problem defining the array object and its find method. My code: type postType = { id: string author: authorType text: string likesCount: number } type arrPostType = { userid: ...
0
votes
0answers
12 views

How to filter a PrimeNG table with a nested object?

I have following question: I want to filter my PrimeNG Table with fields that are not displayed. Here is my Datatable Object: [ { id: 1, actions: [ 'eat', 'drink', 'sleep' ...
0
votes
1answer
21 views

Conditional required validation in angular forms

If both fields dont have inputs then both can be optional. If firstname has input then set lastname as required. If lastname has input but firstname has no input then set firstname as required. Set ...
0
votes
1answer
22 views

Using Classes to define JSON structure

In my project, I have a handful of data model classes that take a response from an API in the constructor. Here's an example, with an arbitrary toJSON method. class Document { id: number name: ...
0
votes
0answers
4 views

package @types/reselect is deprecated for React-Redux using TypeScript

Good afternoon. Recently, gradually learning more about the environment and the philosophy of creating SPA, I learned about the reselect package. Read on the official website for redux, which can help ...
0
votes
0answers
10 views

typescript is ignoring lib specified in tsconfig.json

typescript is ignoring the libs specified in the tsconfig array the issue I am running into is Object.values is working in my typescript files, and ctrl+click takes me to lib.es2017.object.d.ts where ...
0
votes
0answers
5 views

I Get An Error When I Use mapbax-gl.css with react/typescript

When i built a map with mapbox-gl by using react/typescript, i got an error where i imported css file for the mapbox-gl "import 'mapbox-gl/dist/mapbox-gl.css';" i cant figure out what kind ...
0
votes
1answer
17 views

TypeScript - ts(7053) : Element implicitly has an 'any' type because expression of type 'string' can't be used to index

In TypeScript, I declare an interface like this: export default interface MyDTO { readonly num: string; readonly entitle: string; readonly trb: string; readonly ucr: string; ...
0
votes
2answers
17 views

How to pass a Date object as a parameter in routerLink in Angular

This is my code block.In here i am trying to get checkinFrom date object as a parameter in routerLink to another component. <app-chart-chip [routerLink]="['/statistics/subsegment',currentPS,...
0
votes
1answer
8 views

Angular / Firebase / Typescript Interfaces - How to manage interface type of firebase.firestore.FieldValue with toDate()

I have an interface where the date is set to work with firestores timestamps. export interface Album{ album_name: string, album_date: firebase.firestore.FieldValue; } If ...
0
votes
0answers
14 views

React component props interface based on a prop value through React.forwardRef

I created a component that is either a MuiButton or a MuiLink based on a boolean prop called button. It works but wrapping it in React.forwardRef breaks it. I need to wrap it so the ref is correctly ...
0
votes
0answers
6 views

Loading Konva yields “ReferenceError:require is not defined”

I am desperately trying to import KonvaJS (https://konvajs.org/) into my WebApp. When visiting the website of Konva, it just says: install via npm, edit two fields in your tsconfig, "import Konva ...
0
votes
0answers
6 views

Websocket, State Management and Null Values on Updates

I have a simple component. Which consumes an API. That API is {items: [{..}]), statuses: {..}}. Doesn't matter what is inside the items and statuses. Data are coming as they should. But there is one ...

15 30 50 per page
1
2 3 4 5
7964