From a7aa4bc01b587681d937da9a98e07876cbb2ce28 Mon Sep 17 00:00:00 2001 From: Tahmid Ahmed Date: Mon, 19 Jan 2026 19:49:45 -0500 Subject: [PATCH 1/2] Generate .d.ts (declaration files) instead of using regular .ts files --- package.json | 1 + tsconfig.json | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 3892a1edc..ff8eda11e 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "version": "1.7.0", "description": "TypeScript client generator based on DigitalOcean's OpenAPI specification.", "main": "index.js", + "types": "index.d.ts", "scripts": { "test": "node --experimental-vm-modules node_modules/.bin/jest", "test:mock": "node --experimental-vm-modules node_modules/.bin/jest --testPathPatterns=mock", diff --git a/tsconfig.json b/tsconfig.json index 579b2fa68..c20b90a76 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -52,7 +52,7 @@ // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ /* Emit */ - // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ // "declarationMap": true, /* Create sourcemaps for d.ts files. */ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ // "sourceMap": false, /* Create source map files for emitted JavaScript files. */ @@ -114,4 +114,4 @@ "src", "index.ts" ] - } \ No newline at end of file + } From c821a7b43177c51b627a00b4a12d9f964edc49ff Mon Sep 17 00:00:00 2001 From: Tahmid Ahmed Date: Tue, 20 Jan 2026 00:19:03 -0500 Subject: [PATCH 2/2] Add .npmignore to exclude source files from being uploaded --- .npmignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .npmignore diff --git a/.npmignore b/.npmignore new file mode 100644 index 000000000..0f85d6c6a --- /dev/null +++ b/.npmignore @@ -0,0 +1,2 @@ +**/*.ts +!**/*.d.ts