Scaffold ESM TypeScript rewrite as @larvit/smpp

This commit is contained in:
2026-08-25 16:02:27 +02:00
commit 16c935bb18
16 changed files with 2143 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
/**
* Either a failure carrying err, or a success carrying T. Both branches declare every key, so
* callers can destructure once and let `if (err)` narrow what is left.
*/
export type Result<T> =
| ({ err: Error } & Partial<Record<keyof T, undefined>>)
| ({ err?: undefined } & T);
export type VoidResult = { err?: Error };