diff --git a/package.json b/package.json new file mode 100644 index 0000000..705ba63 --- /dev/null +++ b/package.json @@ -0,0 +1,25 @@ +{ + "name": "result", + "description": "Rust-like class Result for safe and easy error management", + "version": "2.0.0", + + "author": "Pascal Perrenoud ", + + "module": "index.ts", + "type": "module", + "files": ["index.ts", "src"], + + "scripts": { + "test": "bun test" + }, + + "dependencies": { + "log": "git+https://git.pband.ch/typescript/log.git" + }, + "devDependencies": { + "@types/bun": "^1.1.2" + }, + "peerDependencies": { + "typescript": "^5.0.0" + } +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..eca42c7 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,35 @@ +{ + "compilerOptions": { + "baseUrl": "src", + + // Enable latest features + "lib": ["ESNext"], + "target": "ESNext", + "module": "ESNext", + "moduleDetection": "force", + "allowJs": true, + "checkJs": true, + + // Bundler mode + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "verbatimModuleSyntax": true, + "noEmit": true, + + // Best practices + "strict": true, + "skipLibCheck": true, + "noFallthroughCasesInSwitch": true, + + // Some stricter flags (disabled by default) + "noUnusedLocals": false, + "noUnusedParameters": false, + "forceConsistentCasingInFileNames": true, + "noPropertyAccessFromIndexSignature": false + }, + + "include": [ + "index.ts", + "src/**/*.ts", + ] +}