Skip to content

TypeScript Docs - #46

Open
ballercat wants to merge 20 commits into
mainfrom
docs
Open

TypeScript Docs#46
ballercat wants to merge 20 commits into
mainfrom
docs

Conversation

@ballercat

Copy link
Copy Markdown
Owner

Leaning into JSDoc & TypeScript type comments.

Using typedoc to generate documentation.

@ballercat
ballercat marked this pull request as ready for review November 29, 2023 15:48
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

2 New issues
0 Security Hotspots
94.3% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

…or TS7

- typescript ^7.0.2 (Go-native tsc)
- typedoc ^0.28.20 with dedicated TS 6.0.3 in typedoc/node_modules
- tsconfig: module=NodeNext (required by TS7), checkJs=false
- Add typedoc.json config (entrypoint src/index.ts, output docs/)
- Add 'typecheck' and 'docs' npm scripts
- Add legacy-peer-deps=true to .npmrc
- Add npm overrides for typedoc peer dep isolation
- Switch @ts-check files with errors to @ts-nocheck (pre-existing issues)
- Export StatusCode type from src/index.ts
- Add src/diagnostics.js (renamed from .cjs in main branch)
- Add class/method JSDoc to core: Cache, Config, Jambox, Emitter
- Add JSDoc to handlers (CacheHandler, ProxyHandler), matchers
  (CacheMatcher, GlobMatcher), server routes, Broadcaster
- Add JSDoc to utils: serialize, deserialize, tiny-server, debounce
- Add JSDoc to small utilities: constants, store, noop, is-uri,
  browser, entrypoint, read-user-config

Fixes for ESM/CJS correctness under "type": "module":
- Repoint Config/Jambox imports from diagnostics.js to diagnostics.cjs
  (the .js CJS file is not loadable as ESM; .cjs was the original)
- Rename read-user-config.js -> read-user-config.cjs (CJS module)
- Rename manifest-plugin.js -> manifest-plugin.cjs and fix webpack
  config import (fixes pre-existing webpack build failure from merge)

Verified: tsc clean, typedoc builds, 33/33 ava tests pass,
webpack compiles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant