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 info about cause explicitly always being undefined #124

Merged
merged 3 commits into from
May 3, 2023

Conversation

KATT
Copy link
Contributor

@KATT KATT commented Feb 7, 2023

Summary

Adds info that cause is always undefined.

Motivation

Further comments

I am not sure if I agree with the decision to hide it, the original issue (#94), seemed to want explicit handling of .cause and not to hide it. It caught me by surprise.

index.d.ts Outdated Show resolved Hide resolved
@voxpelli
Copy link
Contributor

I am not sure if I agree with the decision to hide it

It aims for readable output rather than verbose completeness

@mcollina
Copy link
Member

I think types are likely better be lenient instead.

@mcollina
Copy link
Member

I don't understand this change.

@voxpelli
Copy link
Contributor

@mcollina Without this change accessing .cause will match [key: string]: any; whereas its actually not any, it's known to be never / undefined

@mcollina
Copy link
Member

@voxpelli do you agree with this change?

Copy link
Contributor

@voxpelli voxpelli left a comment

Choose a reason for hiding this comment

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

I generally agree with it, yeah, I do would prefer the cause?: never instead though

index.d.ts Outdated Show resolved Hide resolved
index.d.ts Outdated Show resolved Hide resolved
@mcollina
Copy link
Member

@KATT could you make it to be cause?: never?

KATT and others added 2 commits March 15, 2023 10:22
Co-authored-by: Pelle Wessman <pelle@kodfabrik.se>
@KATT
Copy link
Contributor Author

KATT commented Mar 15, 2023

Apologies about the delay - GitHub notifications are 💀 , I've updated it now

@mcollina mcollina merged commit 3feb29b into pinojs:master May 3, 2023
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.

3 participants