jason810496 commented on code in PR #70812:
URL: https://github.com/apache/airflow/pull/70812#discussion_r3763293220


##########
ts-sdk/docs/tsconfig.json:
##########
@@ -0,0 +1,10 @@
+{
+  "//": "Docs-only tsconfig for the TypeDoc analysis pass. It inherits the 
SDK's compiler settings verbatim and roots the program at the public entry 
point only: TypeScript pulls in whatever that entry point transitively imports, 
but a glob like `../src/**/*.ts` would also root unreachable internal modules 
(e.g. the `cli/` bin, which needs the optional `esbuild` peer dependency) that 
the docs toolchain has no reason to install. `paths` below redirects 
`@msgpack/msgpack`, a real transitive dependency of the checked program 
(coordinator/frames.ts, reachable from the public startCoordinator export): 
Node module resolution walks up node_modules from the *importing file* 
(ts-sdk/src/coordinator/), never sideways into this package's own node_modules, 
so the bare specifier would otherwise never resolve here.",
+  "extends": "../tsconfig.json",
+  "compilerOptions": {
+    "paths": {
+      "@msgpack/msgpack": 
["./node_modules/@msgpack/msgpack/dist.esm/index.d.ts"]

Review Comment:
   It's kept intentionally, having `"./node_modules/@msgpack/msgpack"` is not 
enough to pass the build.
   Without `/dist.esm/index.d.ts`, we will encounter:
   
   ```
     > [email protected] build
     > typedoc
     
     [info] Loaded plugin @clean-jsdoc-theme/typedoc
     ../src/coordinator/frames.ts:41:32 - error TS2307: Cannot find module 
'@msgpack/msgpack' or its corresponding type declarations.
     
     41 import { encode, decode } from "@msgpack/msgpack";
                                       ~~~~~~~~~~~~~~~~~~
     
     [error] Found 1 errors and 0 warnings
   TypeDoc build failed.
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to