lukeed / lukeed/ms

Add a better `parse` return type according to provided `value`

Open
#6 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
248
Forks
5
PR merge metrics
No merged PRs in 30d

Description

Hey 👋

Currently return type of `parse` is `number | undefined`. It would be nice if `value` was checked via TS types and return just `number` when `value` is for example a valid `60s`.

@lukeed/ms - v2.0.2

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the parse API and its current type declarations, then inspect how the value argument is represented in the package. Define the expected narrowing for valid values such as `60s`, while preserving `undefined` when validity cannot be established, and verify the public type behavior with the project's existing checks.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
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.