-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jsx to tsx #2517
Jsx to tsx #2517
Conversation
Quality Gate failedFailed conditions See analysis details on SonarCloud Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
Når jeg søker på |
internalBaseUrl: PropTypes.string, | ||
internalStatbankUrl: PropTypes.string, | ||
toggleDebugging: PropTypes.boolean, | ||
interface DashboardRouterProps { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kan vi bruke samme proptype som på linje 23 her? Ser ut som det kun er èn parameter forskjell...
interface AccordionProps { | ||
accordions?: { | ||
id?: string; | ||
open: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Er dette egentlig en boolean?
contentTypes?: unknown[]; | ||
mainSubjects?: unknown[]; | ||
mainSubjectsEnglish?: unknown[]; | ||
renderSearchWord?(...args: unknown[]): unknown; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Litt usikker på om denne blir riktig? Er det ikke en mer opplagt måte å definere det som en funksjon? (gjelder linje 16-17)
import { Modal } from 'react-bootstrap' | ||
|
||
function BestBetModal(props) { | ||
interface BestBetModalProps { | ||
show?: unknown; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Linje 5 og 6 skal være booleans
onSubmit?(...args: unknown[]): unknown; | ||
owner?: string; | ||
sources?: { | ||
tableId?: unknown; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
number eller string
code?: string; | ||
urlOrId?: string; | ||
selectDisplay?: string; | ||
statbankApiData?: Record<string, unknown>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Er Record riktig her?
function StatbankFrame(props) { | ||
interface StatbankFrameProps { | ||
title?: string; | ||
breadcrumb?: unknown[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
object[]
function StatbankSubjectTree(props) { | ||
interface StatbankSubjectTreeProps { | ||
statbankBaseUrl?: string; | ||
mainSubjects?: unknown[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typen på arrayet var definert før, så her kan vi definere typen
inFactPage?: boolean; | ||
language?: string; | ||
tableData?: { | ||
table?: unknown; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Denne var definert før så vi vet hvordan denne typen er
modifiedTime?: string; | ||
type?: string; | ||
mainSubject?: string; | ||
variants?: unknown; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Denne kan defineres basert på typen fra tidligere
For ganske mange av de nye prop-typene er de allerede definert i ts-filene (og der har vi oftere hele strukturen "riktig"). Vi skulle ikke gått gjennom og hentet de derfra i stedet for å definere de på nytt? |
No description provided.