@neptrek/types
v1.1.5
Published
๐ Shared TypeScript types for the Neptrek project
Readme
๐๏ธ @neptrek/types
Welcome to the base camp of type safety! These TypeScript types will be your trusty guide through the Neptrek codebase trails.
๐ What's in Your Backpack?
Just like every trekker needs essential gear, we've packed the core types you'll need:
- ๐บ๏ธ
NTApiResponse- Your map for API navigation - ๐งญ
NTTrekTypes- Types for all your trekking adventures - โบ
NTAuthTypes- Your shelter for authentication - And more types waiting to be discovered on the trail!
๐๏ธ Installation
Set up your base camp with your favorite package manager:
# Using pnpm (our favorite trail companion)
pnpm add @neptrek/types
# Using npm (the classic route)
npm install @neptrek/types
# Using yarn (for those who like different paths)
yarn add @neptrek/types๐ฅพ Usage
As easy as following trail markers:
import type { NTApiResponse, NTTrekDifficulty } from "@neptrek/types";
// Mark your trail with proper types
const response: NTApiResponse<{ trailId: string }> = {
success: true,
message: "Trail found!",
data: { trailId: "everest-base-camp-01" },
};
// Choose your path wisely
const difficulty: NTTrekDifficulty = "challenging";๐ป Type Categories
Summit Types (API Responses)
type NTApiResponse<T> = NTSuccessResponse<T> | NTErrorResponse;Trail Types (Trek Related)
type NTTrekDifficulty =
| "easy"
| "moderate"
| "challenging"
| "difficult"
| "extreme";Base Camp Types (Auth)
interface NTUser {
id: string;
name: string;
// More fields for our trekking community
}๐โโ๏ธ Development
# Pack your gear (install dependencies)
pnpm install
# Start your trek (development mode)
pnpm dev
# Reach the summit (build)
pnpm build๐ Contributing
Every great trek starts with a single step! Feel free to contribute and help us map new type territories.
๐ฏ License
ISC - As free as the mountain air!
Built with ๐๏ธ by the Neptrek team - Guiding developers to type-safe peaks
