Skip to content

Instantly share code, notes, and snippets.

View rob1121's full-sized avatar

Robinson L. Legaspi rob1121

View GitHub Profile
-- Read the docs: https://www.lunarvim.org/docs/configuration
-- Video Tutorials: https://www.youtube.com/watch?v=sFA9kX-Ud_c&list=PLhoH5vyxr6QqGu0i7tt_XoVK9v-KvZ3m6
-- Forum: https://www.reddit.com/r/lunarvim/
-- Discord: https://discord.com/invite/Xb9B4Ny
--
--
--lvim setup
vim.opt.wrap = true
vim.opt.linebreak = true
@rob1121
rob1121 / try-catch.ts
Last active April 10, 2025 10:09
try-catch
// Types for the result object with discriminated union
type Success<T> = {
data: T;
error: null;
};
type Failure<E> = {
data: null;
error: E;
};