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

refactor: types refactoring #1063

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

DhairyaMajmudar
Copy link

@DhairyaMajmudar DhairyaMajmudar commented Oct 2, 2024

Description

Changes proposed in this pull request:
-> Refactoring files by removing any keywords and typescript warnings disabling comments

cc: @AceTheCreator

Related issue(s)
N/A

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@DhairyaMajmudar DhairyaMajmudar changed the title REF: refactoring Extensions.tsx file fix: types refactoring Oct 2, 2024
@AceTheCreator AceTheCreator self-requested a review as a code owner October 7, 2024 17:43
Copy link
Member

@AceTheCreator AceTheCreator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kindly look into why your build is failing :/

@DhairyaMajmudar
Copy link
Author

Kindly look into why your build is failing :/

I've fixed them 👍🏻

@AceTheCreator AceTheCreator changed the title fix: types refactoring chore: types refactoring Nov 4, 2024
@AceTheCreator AceTheCreator changed the title chore: types refactoring refactor: types refactoring Nov 4, 2024
Copy link
Member

@AceTheCreator AceTheCreator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some reviews for you

@@ -50,7 +48,7 @@ function retrieveSchemaProp(
export interface AsyncApiWebComponentProps extends AsyncApiProps {
cssImportPath?: string;
schemaFetchOptions?: RequestInit;
schemaUrl: string;
schemaUrl?: string;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DhairyaMajmudar the schemaUrl is not an optional value

@@ -2,8 +2,7 @@ import React, { useContext } from 'react';
import { AsyncAPIDocumentInterface } from '@asyncapi/parser';

export const SpecificationContext =
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-explicit-any
React.createContext<AsyncAPIDocumentInterface>(null as any);
React.createContext<AsyncAPIDocumentInterface>(null as never);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think your changes here is unnecessarily strict and semantically incorrect in this scenario. I'd suggest we use the existing type :)

@@ -1,6 +1,5 @@
/* eslint-disable @typescript-eslint/no-unsafe-return */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this line should be removed

Copy link

sonarqubecloud bot commented Dec 2, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants