Skip to content

fix(*): tighten generated transformer types (#668)#670

Closed
Rishabh060105 wants to merge 1 commit into
accordproject:mainfrom
Rishabh060105:Rishabh060105/issue-668-tighten-generated-types
Closed

fix(*): tighten generated transformer types (#668)#670
Rishabh060105 wants to merge 1 commit into
accordproject:mainfrom
Rishabh060105:Rishabh060105/issue-668-tighten-generated-types

Conversation

@Rishabh060105
Copy link
Copy Markdown
Contributor

Closes #668

Tightens the JSDoc-driven generated TypeScript declarations for the public transformer APIs highlighted in #668 so downstream consumers get structured JSON and token-stream types instead of broad any signatures.

Changes

  • Tightened public JSDoc in CommonMarkTransformer, CiceroMarkTransformer, TemplateMarkTransformer, and HtmlTransformer to use structured JSON aliases, concrete token-stream shapes, and Concerto runtime helper types where appropriate
  • Regenerated the affected declaration outputs so the targeted transformer methods no longer emit any, and updated the transpiled TemplateMarkTransformer runtime artifact to keep the package outputs in sync

Flags

  • This is intentionally a narrow first pass for the public APIs called out in feat: tighten TypeScript type declarations — replace any with Concerto model types #668; it does not attempt a repo-wide cleanup of every remaining broad declaration
  • The package test runners passed, but the repository's current checked-in tsc toolchain on this checkout is 3.9.10, which still trips over modern dependency .d.ts syntax when running the standard build:types / npm test path on upstream main

Screenshots or Video

  • Not applicable

Related Issues

Author Checklist

  • Ensure you provide a DCO sign-off for your commits using the --signoff option of git commit.
  • Vital features and changes captured in unit and/or integration tests
  • Commits messages follow AP format
  • Extend the documentation, if necessary
  • Merging to main from Rishabh060105/issue-668-tighten-generated-types

Validation

  • npm run lint --workspace packages/markdown-common
  • npm run lint --workspace packages/markdown-cicero
  • npm run lint --workspace packages/markdown-template
  • npm run lint --workspace packages/markdown-html
  • ../../node_modules/.bin/jest --timeOut=10000 --silent in packages/markdown-common
  • ../../node_modules/.bin/jest --timeOut=10000 --silent in packages/markdown-cicero
  • ../../node_modules/.bin/mocha --timeout 30000 in packages/markdown-template
  • ../../node_modules/.bin/jest --timeOut=10000 --silent in packages/markdown-html

Signed-off-by: Rishabh Jain <rishabhj2005@gmail.com>
@Rishabh060105
Copy link
Copy Markdown
Contributor Author

Rishabh060105 commented May 10, 2026

Hi @mttrbrts, I opened a follow-up for #668 that tightens the JSDoc-driven generated types for the public transformer APIs you called out.

This change stays intentionally narrow and focuses on:

  • CommonMarkTransformer
  • CiceroMarkTransformer
  • TemplateMarkTransformer
  • HtmlTransformer

What changed:

  • replaced broad any-style JSDoc on the targeted public methods with structured JSON aliases and concrete token-stream shapes
  • tightened serializer/model-manager annotations where the Concerto runtime helper types were a clean fit
  • regenerated the affected declaration outputs so those public transformer methods now emit more useful types for downstream TypeScript consumers

I also verified the touched packages with lint plus direct package test runs. One caveat I noted in the PR body: the current upstream build:types path is still hitting the older checked-in tsc 3.9.10 toolchain against newer dependency declarations, so I validated the emitted declaration changes and package behavior directly rather than relying on the full repo npm test path.

@mttrbrts
Copy link
Copy Markdown
Member

Thanks for the contribution @Rishabh060105, unfortunately I already have an open PR which addresses this issue. Please review the PR, I'd love to understand if you found any more gaps that I missed?

#669

@mttrbrts mttrbrts closed this May 13, 2026
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.

feat: tighten TypeScript type declarations — replace any with Concerto model types

2 participants