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

With Typescript Omit Union types get lost #882

Open
bmsuseluda opened this issue Dec 19, 2023 · 0 comments
Open

With Typescript Omit Union types get lost #882

bmsuseluda opened this issue Dec 19, 2023 · 0 comments

Comments

@bmsuseluda
Copy link

Hello together,

with the following code the union type of name gets lost:

interface FullProps {
  /** The name to greet */
  name: "world" | "hello";
  title: string;
}

type Props = Omit<FullProps, "title">

/**
 * Hello world component
 */
const MyComponent = ({name = 'world'}: Props) => {
  return <div />;
}

I have similar problems with Extract and Pick.

Is it possible to support these typescript function?

Thanks in regards

@bmsuseluda bmsuseluda changed the title With Typescript Omit Union types gets lost With Typescript Omit Union types get lost Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants