Skip to content

Commit

Permalink
✨ Add ts-utils package (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
cloud-walker authored Jan 5, 2023
1 parent 1a1261c commit 49a36f9
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/calm-bats-visit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@cloudwalker/ts-utils': minor
---

✨ Add ObjectValues<T> type
3 changes: 3 additions & 0 deletions packages/ts-utils/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
dist
coverage
34 changes: 34 additions & 0 deletions packages/ts-utils/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"name": "@cloudwalker/ts-utils",
"version": "0.0.0",
"type": "module",
"scripts": {
"build": "tsup src/main.ts",
"dev": "tsup src/main.ts --watch"
},
"files": [
"dist/**"
],
"main": "./dist/main.cjs",
"module": "./dist/main.js",
"types": "./dist/main.d.ts",
"exports": {
".": {
"import": "./dist/main.js",
"require": "./dist/main.cjs"
}
},
"sideEffects": false,
"author": {
"name": "Luca Barone",
"email": "baro.luc@gmail.com",
"url": "https://github.com/cloud-walker"
},
"devDependencies": {
"tsup": "^6.2.3",
"typescript": "^4.8.2"
},
"publishConfig": {
"access": "public"
}
}
1 change: 1 addition & 0 deletions packages/ts-utils/src/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export type ObjectValues<T extends Record<string, unknown>> = T[keyof T]
8 changes: 8 additions & 0 deletions packages/ts-utils/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"compilerOptions": {
"strict": true,
"module": "NodeNext",
"skipLibCheck": true
},
"include": ["src"]
}
8 changes: 8 additions & 0 deletions packages/ts-utils/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import {defineConfig} from 'tsup'

export default defineConfig({
format: ['cjs', 'esm'],
dts: true,
minify: true,
sourcemap: true,
})

0 comments on commit 49a36f9

Please sign in to comment.