Skip to content

[Minor] Types exported - #2574

Open
Jialecl wants to merge 19 commits into
masterfrom
jialecl/types-export
Open

Jialecl wants to merge 19 commits into
masterfrom
jialecl/types-export

Conversation

@Jialecl

@Jialecl Jialecl commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Checklist
(Check off all the items before submitting)

  • Build process is done without errors. All tests pass in the /lib directory.
  • Self-reviewed the code before submitting.
  • Meets accessibility standards.
  • Added/updated documentation to /website as needed.
  • Added/updated tests as needed.

Purpose
Types exported with the components, but only those deemed to be useful to users.
CoreTokens and AliasTokens are also exported.
Aditionally some improvements to typings were done avoiding breaking changes.

@Jialecl
Jialecl marked this pull request as draft October 14, 2026 08:03
@Jialecl
Jialecl marked this pull request as ready for review October 19, 2026 14:02
Comment thread packages/lib/src/index.ts Outdated
ContainerBorderProperties as DxcContainerBorderProperties,
ContainerBorder as DxcContainerBorder,
ContainerOutline as DxcContainerOutline,
ContainerOverflow as DxcOverflow,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It should be DxcContainerOverflow, same as DxcContainerOutline

Comment thread packages/lib/src/index.ts Outdated
} from "./grid/types";
export type {
HeaderProps as DxcHeaderProps,
HeaderMainNavPropsType as DxcHeaderMainNavPropsType,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

"PropsType" at the end should be remove, same as all the other files

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Check how this changes affect utils.ts

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

check how this affects the stories file of the DataGrid

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

check stories of this component

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

check test files of this component

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

check stories of Grid component

@@ -1,7 +1,7 @@
import styled from "@emotion/styled";
import StatusLightPropsType from "./types";
import iStatusLightProps from "./types";

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

typo in "iStatusLightProps" "i" should be removed

Comment thread packages/lib/src/toast/types.ts Outdated
>;

type ToastContextType = (toast: ToastType, semantic: Semantic) => () => void;
type ToastContext = (toast: ToastType, semantic: Semantic) => () => void;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

ToastContext is already the name of the React context in toast/ToastContext.tsx (imported as ToastContext in ToastsQueue.tsx), so this type name collides with it. Could we keep the original ToastContextType or use a name that describes the signature, like AddToast?


export default ToastPropsType;
export type { ToastProps as default };
export type {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why did we remove CommonProps from the export?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

CommonProps is not used outside of types. Also there is not benefit of exporting it alongside other types.

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