Skip to content

Unsafe option#18

Merged
dbidwell94 merged 4 commits into
masterfrom
unsafe-option
Sep 2, 2025
Merged

Unsafe option#18
dbidwell94 merged 4 commits into
masterfrom
unsafe-option

Conversation

@dbidwell94

Copy link
Copy Markdown
Owner

this PR adds support for unwrapping the Option type without checking for undefined | null. This also adds support for unwrapOr to return undefined | null.

New functions:

  • unsafeUnwrap(): T | undefined | null
  • unsafeUnwrapOr(defaultValue?: T | null): T | undefined | null

@dbidwell94

Copy link
Copy Markdown
Owner Author

Coverage after merging unsafe-option into master

98.02%

Coverage Report
FileBranchesFuncsLinesUncovered Lines
src
   index.tsN/A100%100%
src.option
   index.tsN/A100%95.65%131, 143
src.result
   index.tsN/A100%100%

@dbidwell94

Copy link
Copy Markdown
Owner Author

Coverage after merging unsafe-option into master

100.00%

Coverage Report
FileBranchesFuncsLinesUncovered Lines
src
   index.tsN/A100%100%
src.option
   index.tsN/A100%100%
src.result
   index.tsN/A100%100%

@dbidwell94 dbidwell94 merged commit 4c4b769 into master Sep 2, 2025
1 check passed
@dbidwell94 dbidwell94 deleted the unsafe-option branch September 3, 2025 20:23
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.

1 participant