tc39 / tc39/proposal-json-parseimmutable

non-undefined non-boolean options should throw

Open
#20 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
48
Forks
4
Avg merge
1d 1m
Merged PRs (30d)
5

Description

https://github.com/tc39/how-we-work/blob/main/normative-conventions.md#avoid-coercing-arguments-to-types-other-than-boolean means an API is allowed to coerce to boolean, but it does not require such coercion.

I think it would be a win for type strictness to ensure that both options are either undefined or a boolean.

filing per https://github.com/tc39/proposal-json-parseimmutable/pull/18#discussion_r4040150323

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the JSON.parseImmutable options entry point and read the linked normative convention and pull-request discussion for the intended validation behavior. Identify the existing tests for option handling, then verify that each option accepts undefined or a boolean and throws for other values.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.