cyc-type-def 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,10 @@
1
+ declare function greet(name: string): string;
2
+ declare function sum(a: number, b: number): number;
3
+
4
+ interface User {
5
+ id: string;
6
+ name: string;
7
+ email: string;
8
+ }
9
+
10
+ export { type User, greet, sum };
@@ -0,0 +1,10 @@
1
+ declare function greet(name: string): string;
2
+ declare function sum(a: number, b: number): number;
3
+
4
+ interface User {
5
+ id: string;
6
+ name: string;
7
+ email: string;
8
+ }
9
+
10
+ export { type User, greet, sum };
package/dist/index.js ADDED
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ greet: () => greet,
24
+ sum: () => sum
25
+ });
26
+ module.exports = __toCommonJS(index_exports);
27
+
28
+ // src/utils.ts
29
+ function greet(name) {
30
+ return `Hello, ${name}!`;
31
+ }
32
+ function sum(a, b) {
33
+ return a + b;
34
+ }
35
+ // Annotate the CommonJS export names for ESM import in node:
36
+ 0 && (module.exports = {
37
+ greet,
38
+ sum
39
+ });
package/dist/index.mjs ADDED
@@ -0,0 +1,11 @@
1
+ // src/utils.ts
2
+ function greet(name) {
3
+ return `Hello, ${name}!`;
4
+ }
5
+ function sum(a, b) {
6
+ return a + b;
7
+ }
8
+ export {
9
+ greet,
10
+ sum
11
+ };
package/package.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "cyc-type-def",
3
+ "version": "1.0.0",
4
+ "main": "dist/index.js",
5
+ "types": "dist/index.d.ts",
6
+ "files": [
7
+ "dist"
8
+ ],
9
+ "scripts": {
10
+ "build": "tsup src/index.ts --format cjs,esm --dts",
11
+ "dev": "tsup src/index.ts --format cjs,esm --dts --watch",
12
+ "test": "jest",
13
+ "prepublishOnly": "npm run build"
14
+ },
15
+ "keywords": [],
16
+ "author": "",
17
+ "license": "ISC",
18
+ "description": "",
19
+ "devDependencies": {
20
+ "@types/jest": "^30.0.0",
21
+ "@types/node": "^24.0.13",
22
+ "jest": "^29.7.0",
23
+ "ts-jest": "^29.4.0",
24
+ "ts-node": "^10.9.2",
25
+ "tsup": "^8.5.0",
26
+ "typescript": "^5.8.3"
27
+ }
28
+ }