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 DeepNonNullable #35

Merged
merged 2 commits into from
Nov 22, 2018
Merged

Add DeepNonNullable #35

merged 2 commits into from
Nov 22, 2018

Conversation

malash
Copy link
Contributor

@malash malash commented Nov 21, 2018

As I mentioned in the PR #33 I have created a new type DeepNonNullable.

type NestedProps = {
  first?: null | {
    second?: null | {
      name?: null | string;
    };
  };
};
let a = {} as NestedProps;
const s1: string = a.first!.second!.name!;
let b = {} as DeepNonNullable<NestedProps>;
const s2: string = b.first.second.name;

@piotrwitek
Copy link
Owner

That's cool, looks good!

Would you mind to also add a new entry in the API Docs in readme.md?
Thanks!

Copy link
Contributor Author

@malash malash left a comment

Choose a reason for hiding this comment

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

Thanks. I'v added documentation for it.

@@ -468,7 +469,7 @@ import { DeepRequired } from 'utility-types';
type NestedProps = {
first?: {
second?: {
name?: string | null | undefined;
name?: string;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I fixed a typo here.

@piotrwitek piotrwitek merged commit b7cb35d into piotrwitek:master Nov 22, 2018
@piotrwitek
Copy link
Owner

Great job! Thanks for contribution. 🎉

@piotrwitek
Copy link
Owner

Regarding release I plan it for the weekend. I'm working on several other updates with recent [email protected], build tools and better type testing.

@malash malash deleted the feature/deep-non-nullable branch November 22, 2018 13:15
@malash
Copy link
Contributor Author

malash commented Nov 22, 2018

Thank you!

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