Skip to content
This repository was archived by the owner on Mar 26, 2025. It is now read-only.

Conversation

@olistic
Copy link

@olistic olistic commented Jun 26, 2023

Description

This is an alternative to #86, which fixes the index signatures not supporting optional (undefined) values.

#86 modifies the Json type adding undefined to it, which may be considered not technically correct. This PR proposes an alternative way that doesn't touch the Json type.

Type of Change

  • Bug fix

Does this introduce a breaking change?

No.

Are documentation updates required?

No.

Testing information

Build the project and verify the TS compiler doesn't show errors in decode.d.ts for optional properties. Example:

Property 'alg' of type 'string | undefined' is not assignable to 'string' index type 'Json'.

Checklist

  • Code is commented where needed
  • Unit test coverage for new or modified code paths
  • npm run test passes
  • Changelog is updated
  • Tag 1 of @person1 or @Person2

@CLAassistant
Copy link

CLAassistant commented Jun 26, 2023

CLA assistant check
All committers have signed the CLA.

@olistic
Copy link
Author

olistic commented Aug 12, 2024

@janniks anything else I can do to help landing this?

@janniks
Copy link
Contributor

janniks commented Aug 13, 2024

I think it looks good 👍🏻 Thanks for the ping. I'll add a second reviewer as well.

@janniks janniks requested review from janniks and zone117x August 13, 2024 00:04
Copy link
Contributor

@janniks janniks left a comment

Choose a reason for hiding this comment

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

I don't see why this should be a problem. @zone117x any thoughts?

@olistic
Copy link
Author

olistic commented Oct 6, 2024

@janniks @zone117x can this be merged (and ideally released)? :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants