diff --git a/d2js/js/CHANGELOG.md b/d2js/js/CHANGELOG.md index 8ca55ec1f..18767b5cc 100644 --- a/d2js/js/CHANGELOG.md +++ b/d2js/js/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to only the d2.js package will be documented in this file. **Does not include changes to the main d2 project.** +## Next + +- Fix TypeScript signatures + ## [0.1.22] ### March 20, 2025 diff --git a/d2js/js/index.d.ts b/d2js/js/index.d.ts index 9b2977a44..0b455af6e 100644 --- a/d2js/js/index.d.ts +++ b/d2js/js/index.d.ts @@ -47,7 +47,7 @@ export interface CompileRequest { /** A mapping of D2 file paths to their content*/ fs: Record; /** The path of the entry D2 file [default: index]*/ - inputPath: string; + inputPath?: string; /** The CompileOptions to pass to the compiler*/ options: CompileOptions; } diff --git a/d2js/js/package.json b/d2js/js/package.json index e7923f7b7..3eee22350 100644 --- a/d2js/js/package.json +++ b/d2js/js/package.json @@ -23,9 +23,13 @@ "browser": "./dist/browser/index.js", "import": { "browser": "./dist/browser/index.js", - "default": "./dist/node-esm/index.js" + "default": "./dist/node-esm/index.js", + "types": "./index.d.ts" + }, + "require": { + "default": "./dist/node-cjs/index.js", + "types": "./index.d.ts" }, - "require": "./dist/node-cjs/index.js", "default": "./dist/node-esm/index.js" }, "./worker": "./dist/browser/worker.js"