Skip to content

refactor: type render methods as string (#832) - #975

Merged
harttle merged 8 commits into
nextfrom
v11/render-string-returns
Oct 5, 2026
Merged

harttle merged 8 commits into
nextfrom
v11/render-string-returns

Conversation

@harttle

@harttle harttle commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • render, renderSync, parseAndRender, parseAndRenderSync, renderFile, and renderFileSync are typed as string / Promise<string>.
  • Runtime output is already emitter.buffer, a string. This only replaces the any return type.

Fixes #832

Test plan

  • npm run build
  • npm run lint

harttle and others added 2 commits October 5, 2026 21:00
- Change render methods from returning any to string
- Change internal generator methods from any to unknown
- Change evalValue methods from any to unknown
- Add suppressImplicitAnyIndexErrors to rollup config

This improves TypeScript support for users who depend on render method return types.

Fixes #832
Co-authored-by: Cursor <cursoragent@cursor.com>
@coveralls

coveralls commented Oct 5, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 37325643328

Warning

No base build found for commit ce93805 on next.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 99.528%

Details

  • Patch coverage: 2 of 2 lines across 1 file are fully covered (100%).

Uncovered Changes

No uncovered changes found.

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 2973
Covered Lines: 2964
Line Coverage: 99.7%
Relevant Branches: 1052
Covered Branches: 1042
Branch Coverage: 99.05%
Branches in Coverage %: Yes
Coverage Strength: 18995.8 hits per line

💛 - Coveralls

harttle and others added 5 commits October 5, 2026 21:25
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@harttle harttle changed the title feat: improve return types for render methods (#832) feat!: return string from render methods (#832) Oct 5, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
@harttle harttle changed the title feat!: return string from render methods (#832) refactor!: return string from render methods (#832) Oct 5, 2026
@harttle harttle changed the title refactor!: return string from render methods (#832) refactor: type render methods as string (#832) Oct 5, 2026
@harttle
harttle merged commit 890103f into next Oct 5, 2026
11 checks passed
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.

2 participants