Add shared TypeScript package

This commit is contained in:
Asep Haryana Saputra
2026-05-22 12:17:13 +00:00
parent 4413133bf3
commit c3eed82262
5 changed files with 49 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
type: library
language: typescript
tasks:
typecheck:
command: bun run typecheck
inputs:
- src/**/*
- tsconfig.json
- package.json
+16
View File
@@ -0,0 +1,16 @@
{
"name": "@zeavis/shared",
"version": "0.1.0",
"private": true,
"type": "module",
"exports": {
".": "./src/index.ts",
"./app-status": "./src/app-status.ts"
},
"scripts": {
"typecheck": "tsc --project tsconfig.json"
},
"devDependencies": {
"typescript": "^5.6.3"
}
}
+13
View File
@@ -0,0 +1,13 @@
export type AppStatus = {
name: 'ZeaVis Edu';
status: 'ok';
version: string;
};
export function createAppStatus(version = '0.1.0'): AppStatus {
return {
name: 'ZeaVis Edu',
status: 'ok',
version,
};
}
+2
View File
@@ -0,0 +1,2 @@
export type { AppStatus } from './app-status';
export { createAppStatus } from './app-status';
+8
View File
@@ -0,0 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"lib": ["ES2022"],
"types": []
},
"include": ["src"]
}