papr icon indicating copy to clipboard operation
papr copied to clipboard

feat: Support readonly options for Types.string and Types.number

Open duncanbeevers opened this issue 1 year ago • 1 comments

Although support was added for readonly values passed to Types.enum, the same functionality was not added to the Types.string and Types.number enum options member.

duncanbeevers avatar Nov 06 '24 18:11 duncanbeevers

I'm pretty sure the behavior of this test changes when it is transplanted into main. Do you have a suggestion for a different way to check the new behavior?

On Mon, Feb 17, 2025, 1:02 AM Valentin Agachi @.***> wrote:

@.**** commented on this pull request.

In src/tests/types.test.ts https://github.com/plexinc/papr/pull/956#discussion_r1957853276:

  •    const options = {
    
       maximum: 9,
       minimum: 2,
       multipleOf: 2,
  •    });
    
  •    } as const;
    
  •    types.number(options);
    

This does not to be defined as const. Please keep this options object inline.

— Reply to this email directly, view it on GitHub https://github.com/plexinc/papr/pull/956#pullrequestreview-2620422370, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAABZR3XTEZOLOVSTEMHNYT2QGQTFAVCNFSM6AAAAABRJNVTKKVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDMMRQGQZDEMZXGA . You are receiving this because you authored the thread.Message ID: @.***>

duncanbeevers avatar Feb 17 '25 10:02 duncanbeevers