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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

O.Merge drops null types from optional properties of O #149

Closed
osaton opened this issue Sep 29, 2020 · 1 comment
Closed

O.Merge drops null types from optional properties of O #149

osaton opened this issue Sep 29, 2020 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@osaton
Copy link

osaton commented Sep 29, 2020

馃悶 Bug Report

Describe the bug

O.Merge drops null type from optional properties of O since 8.0.5. 8.0.4 works as expected.

Reproduce the bug

type Merged = O.Merge<{
  optionalNull?: string | null | number | boolean;
}, {
  optionalNull2?: string | null | number | boolean;
}>;

Creates type:

type Merged = {
    optionalNull?: string | number | boolean | undefined;
    optionalNull2?: string | number | boolean | null | undefined;
}

Expected behavior (<= 8.0.4)

type Merged = {
    optionalNull?: string | number | boolean | null | undefined;
    optionalNull2?: string | number | boolean | null | undefined;
}

Additional information

  • typescript@4.0.3
{
  "compilerOptions": {
    "lib": ["es2017", "DOM"],
    "noImplicitReturns": true,
    "noImplicitAny": true,
    "strict": true,
    "strictNullChecks": true
  }
}
@millsp millsp self-assigned this Sep 29, 2020
@millsp millsp added the bug Something isn't working label Oct 6, 2020
@millsp
Copy link
Owner

millsp commented Oct 6, 2020

Thank you so much for reporting this. Fix is on the way!

@millsp millsp closed this as completed Oct 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants