Skip to content

Instantly share code, notes, and snippets.

View lltx's full-sized avatar
🍎
保持专注

leng leng lltx

🍎
保持专注
View GitHub Profile
@lltx
lltx / .cursorrules
Last active August 7, 2025 06:12 — forked from boxabirds/.cursorrules
Rock solid: turn Cursor into a rock-solid software engineering companion
# Project Policy
This policy provides a single, authoritative, and machine-readable source of truth for AI coding agents and humans, ensuring that all work is governed by clear, unambiguous rules and workflows. It aims to eliminate ambiguity, reduce supervision needs, and facilitate automation while maintaining accountability and compliance with best practices.
# 1. Introduction
> Rationale: Sets the context, actors, and compliance requirements for the policy, ensuring all participants understand their roles and responsibilities.
## 1.1 Actors
@lltx
lltx / try-catch.ts
Created February 24, 2025 05:44 — forked from t3dotgg/try-catch.ts
Theo's preferred way of handling try/catch in TypeScript
// Types for the result object with discriminated union
type Success<T> = {
data: T;
error: null;
};
type Failure<E> = {
data: null;
error: E;
};