drifter-js
v0.0.1
Published
A TypeScript library template
Readme
Drifter
A TypeScript library template with strict type checking enabled.
Features
- ✅ TypeScript with strict mode and null safety
- ✅ ESLint configuration with TypeScript rules
- ✅ Build scripts for compilation
- ✅ Declaration files generation
- ✅ Source maps support
Installation
npm install drifterUsage
import { greet, Calculator } from 'drifter';
// Simple greeting function
console.log(greet('Hello')); // "Hello!"
console.log(greet('Hello', 'World')); // "Hello, World!"
// Calculator with strict typing
const calc = new Calculator();
const result = calc.add(5, 3); // 8
console.log(calc.getLastResult()); // 8Development
Setup
npm installBuild
npm run buildWatch mode
npm run build:watchLinting
npm run lint
npm run lint:fixClean
npm run cleanTypeScript Configuration
This library uses strict TypeScript configuration with:
strict: true- Enables all strict type checking optionsstrictNullChecks: true- Ensures null safetynoImplicitAny: true- Requires explicit type annotationsexactOptionalPropertyTypes: true- Strict optional property handlingnoUncheckedIndexedAccess: true- Safe array/object access
License
MIT
