Skip to content
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

add typing and fix build #404

Merged
merged 1 commit into from
May 21, 2024
Merged

add typing and fix build #404

merged 1 commit into from
May 21, 2024

Conversation

ziegenberg
Copy link
Member

@ziegenberg ziegenberg commented May 21, 2024

Currently, the build fails with:

TS2578: Unused '@ts-expect-error' directive.
    1 | import React, { useEffect, useState } from "react";
    2 | import { useTranslation } from "react-i18next";
  > 3 | // @ts-expect-error TS(7016): Could not find a declaration file for module 'styl... Remove this comment to see the full error message
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    4 | import styled from "styled-components";
    5 | import {
    6 | 	getPageOffset,

And running the admin-ui fails with:

ERROR in src/components/shared/Table.tsx:236:28
TS2769: No overload matches this call.
  Overload 1 of 2, '(props: PolymorphicComponentProps<"web", FastOmit<DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, never>, void, void, {}, {}>): Element', gave the following error.
    Type '{ order: any; }' is not assignable to type 'IntrinsicAttributes & FastOmit<Substitute<FastOmit<DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, never>, FastOmit<...>>, keyof ExecutionProps> & FastOmit<...> & { ...; }'.
      Property 'order' does not exist on type 'IntrinsicAttributes & FastOmit<Substitute<FastOmit<DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, never>, FastOmit<...>>, keyof ExecutionProps> & FastOmit<...> & { ...; }'.
  Overload 2 of 2, '(props: FastOmit<DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, never>): ReactElement<any, string | JSXElementConstructor<...>> | null', gave the following error.
    Type '{ order: any; }' is not assignable to type 'IntrinsicAttributes & FastOmit<DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, never>'.
      Property 'order' does not exist on type 'IntrinsicAttributes & FastOmit<DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, never>'.
    234 | 										<span>{t(column.label)}</span>
    235 | 										{!!sortBy && column.name === sortBy ? (
  > 236 | 											<SortActiveIcon order={reverse} />
        | 											                ^^^^^
    237 | 										) : (
    238 | 											<SortIcon />
    239 | 										)}

@ziegenberg ziegenberg added the type:bug Something isn't working label May 21, 2024
@ziegenberg ziegenberg mentioned this pull request May 21, 2024
Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
@lkiesow lkiesow merged commit 34dd129 into opencast:main May 21, 2024
2 checks passed
@ziegenberg ziegenberg deleted the fix-admin-ui branch May 21, 2024 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants