Skip to content

Commit

Permalink
Emit types
Browse files Browse the repository at this point in the history
  • Loading branch information
tanyav2 committed Nov 20, 2024
1 parent c2edd07 commit f5aaad8
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 5 deletions.
Binary file modified bun.lockb
Binary file not shown.
20 changes: 18 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
{
"name": "ohttp-ts",
"name": "oblivious-http",
"version": "0.1.0",
"description": "Oblivious HTTP implementation in TypeScript",
"module": "index.ts",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
}
},
"scripts": {
"clean": "rm -rf dist",
"build": "bun build ./index.ts --outdir ./dist && bun run build:declaration",
"build:declaration": "tsc --emitDeclarationOnly",
"prepublishOnly": "bun run build"
},
"devDependencies": {
"@types/bun": "latest"
"@types/bun": "^1.1.13"
},
"peerDependencies": {
"typescript": "^5.6.3"
Expand Down
13 changes: 10 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"compilerOptions": {
"outDir": "./dist",

// Enable latest features
"lib": ["ESNext", "DOM"],
"target": "ESNext",
Expand All @@ -12,7 +14,8 @@
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"noEmit": true,
"noEmit": false,
"emitDeclarationOnly": true,

// Best practices
"strict": true,
Expand All @@ -22,6 +25,10 @@
// Some stricter flags (disabled by default)
"noUnusedLocals": false,
"noUnusedParameters": false,
"noPropertyAccessFromIndexSignature": false
}
"noPropertyAccessFromIndexSignature": false,

// Declarations
"declaration": true,
},
"include": ["src/**/*", "index.ts"]
}

0 comments on commit f5aaad8

Please sign in to comment.