ThePrimeagen

jarl

Just Another Results Library for TypeScript

by ThePrimeagen

TypeScript

TypeScript99.6%
Shell0.4%

Commit activity

Last 12 weeks · 7 commits

Full graph →

Community health

1 of 6 standards met

Community profile →
28
✓README○License○Contributing○Code of Conduct○Issue Template○PR Template

Recent PRs & issues

Active · 1 in progress · Last activity 1mo ago
See all on GitHub →
ThePrimeagen

Bumps from to . The annotated tag has already been pushed and points at this branch's commit. It is a minor release because it adds and since . The existing , , and tags are unchanged. passes (lint, typecheck, 19 tests).   

ThePrimeagen · 1mo ago
ThePrimeagen

Bumps from to . The annotated tag is already pushed and points at this commit. is a minor release that adds (#5). It's rather than because was already tagged for . That release's version bump never reached master, so master's still says . Merging this brings master up to date. (lint, typecheck, tests) passes on the tagged commit.   

ThePrimeagen · 1mo ago
ThePrimeagen

shows up a lot. does the same thing without the extra call. It has the same interface as , minus the curried call. takes no arguments, and the optional only receives the caught error. It delegates to , so the behaviour is identical. A rejection and a synchronous throw both become the error. If itself throws, the promise rejects, the same as with . Tests (written first, failing before the implementation): happy path: the function is called once with no arguments, and the result holds its value a rejection goes through without , the thrown value is the error, typed a synchronous throw resolves to an error instead of rejecting if throws, the promise rejects (checked against too) the types match exactly misuse is a type error: a non-async function, a function that takes arguments, a that takes arguments, or calling the result (lint, typecheck, tests) passes.   

ThePrimeagen · 1mo ago
ThePrimeagen

calls and returns immediately. Nothing waits on it, and any error is ignored. The function must return a promise, so is a type error. The arguments after it must be exactly the function's parameters. Missing, wrong-typed, and extra arguments are all type errors. A rejected promise and a synchronous throw before the promise is returned are both swallowed, and neither causes an unhandled rejection. Tests (, ) Happy path: calls the function with the arguments and returns before the function finishes. Unhappy path: ignores a rejected promise, checked with an listener. Unhappy path: ignores a function that throws before returning its promise. Types: the return type is . Types: four cases cover a non-async function, a missing argument, a wrong argument type, and an extra argument. Each test was checked against a deliberately broken implementation: accepting non-async functions, returning the promise, dropping the /, and catching only rejections via . Each break made the matching test fail. (lint, typecheck, test) passes with 19 tests and 0 lint warnings.   

ThePrimeagen · 1mo ago
Structured data for AI agents

Repository: ThePrimeagen/jarl. Description: Just Another Results Library for TypeScript Stars: 31, Forks: 1. Primary language: TypeScript. Languages: TypeScript (99.6%), Shell (0.4%). Open PRs: 1, open issues: 0. Last activity: 1mo ago. Community health: 28%. Top contributors: ThePrimeagen.