Skip to content

fix(docs): generate the API documentation from the built declarations - #40

Merged
skjnldsv merged 1 commit into
mainfrom
fix/typedoc-vue-imports
Sep 16, 2026
Merged

skjnldsv merged 1 commit into
mainfrom
fix/typedoc-vue-imports

Conversation

@skjnldsv

Copy link
Copy Markdown
Contributor

The Documentation workflow has failed on every push to main since #34 (e1bdc29) removed the blanket *.vue module declaration:

lib/mount.ts:6:20 - error TS2307: Cannot find module './views/Viewer.vue' or its corresponding type declarations.
[error] Found 5 errors and 0 warnings

typedoc runs plain tsc, so it cannot resolve single file components on its own. Rather than bringing the shim back (it hid broken component types, which is why #34 removed it), typedoc now reads dist/index.d.ts, the declarations the build already rolls up with the components typed and the doc comments intact. build:doc runs npm run build first so the file exists.

Generated locally: the Viewer class, the five functions, IHandler / ViewerAPI / ViewerEmits / ViewerProps, and ViewerOptions, the same set as the last green run. Latest red run: https://github.com/nextcloud-libraries/nextcloud-viewer/actions/runs/34610176996

👾 This pull request was assisted by Claude Code, commits carry an Assisted-by trailer.

Since e1bdc29 dropped the blanket `*.vue` module declaration, typedoc
cannot resolve the `.vue` imports in `lib/` and the docs workflow fails
on every push to main. typedoc runs plain tsc, which knows nothing about
Vue single file components.

The declarations `npm run build` rolls up into `dist/index.d.ts` already
have those components typed, along with the doc comments, so typedoc
now reads that file instead, through a tsconfig that includes it.
`build:doc` runs the build first so the file is there.

Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
@skjnldsv skjnldsv added status: review Waiting for reviews type: bug 🐛 Something isn't working AI assisted labels Sep 16, 2026
@codecov

codecov Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.83%. Comparing base (7735d90) to head (83a41d1).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #40   +/-   ##
=======================================
  Coverage   87.83%   87.83%           
=======================================
  Files          36       36           
  Lines        2474     2474           
  Branches      519      519           
=======================================
  Hits         2173     2173           
  Misses        297      297           
  Partials        4        4           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@skjnldsv
skjnldsv merged commit 7e37f86 into main Sep 16, 2026
18 checks passed
@skjnldsv
skjnldsv deleted the fix/typedoc-vue-imports branch September 16, 2026 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI assisted status: review Waiting for reviews type: bug 🐛 Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant