Skip to content

Conversation

@ImLunaHey
Copy link

Please let me know if I missed anything in this.

Fixes: #173

@qb20nh
Copy link

qb20nh commented Jan 23, 2024

Argument name should not change.

@ImLunaHey
Copy link
Author

ImLunaHey commented Jan 23, 2024

it should never have been called text to begin with. it's a value.

@qb20nh
Copy link

qb20nh commented Jan 24, 2024

That is not a typescript issue.

@qb20nh
Copy link

qb20nh commented Jan 25, 2024

For completeness and consistency, we should generalize to all valid JSON string producing text values.

parse<T extends boolean | number | bigint>(text: T, /*...*/): T
parse<T extends boolean | number | bigint | null>(text: T, /*...*/): unknown

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.

allow passing null to JSON.parse()

2 participants