Skip to content

fix(theme): simplify types rendering#184

Open
moshams272 wants to merge 2 commits into
webpack:mainfrom
moshams272:fix/simplify-types
Open

fix(theme): simplify types rendering#184
moshams272 wants to merge 2 commits into
webpack:mainfrom
moshams272:fix/simplify-types

Conversation

@moshams272

Copy link
Copy Markdown
Contributor

Summary

This PR simplifies types rendering and rely on nodejs/doc-kit's oxc-parser

@vercel

vercel Bot commented Jul 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
webpack-doc-kit Ready Ready Preview, Comment Jul 15, 2026 9:41pm

Request Review

Comment thread plugins/theme/partials/types.mjs Outdated
};

export const someType = model => `{${resolve(model)}}`;
export const someType = model => (model ? `{${model}}` : 'unknown');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export const someType = model => (model ? `{${model}}` : 'unknown');
export const someType = model => `{${model ?? 'unknown' }}`;

Even if it's unknown, we want that within the brackets

Comment thread plugins/theme/partials/types.mjs Outdated
Comment on lines 20 to 21

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These can also be routed to someType now, I think

@avivkeller

Copy link
Copy Markdown
Member

@moshams272 Can you bump doc-kit to 1.4.3 in this PR as well, which adds that TypeScript improvement

@moshams272

moshams272 commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

@moshams272 Can you bump doc-kit to 1.4.3 in this PR as well, which adds that TypeScript improvement

Oh! I use it from github from last time 😅

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