Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not works for ts 1196 #121

Open
hexh250786313 opened this issue Aug 24, 2024 · 0 comments
Open

Not works for ts 1196 #121

hexh250786313 opened this issue Aug 24, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@hexh250786313
Copy link

ts 1196: Catch clause variable type annotation must be 'any' or 'unknown' if specified.

ref: https://typescript.tv/errors/#ts1196

image

I have tried to debug and it just throws a error:

image

It seems the following function receives a 22 as param causing the error.

export function formatTypeBlock(
prefix: string,
type: string,
format: (type: string) => string
) {
// Return a simple code block if it's just a parenthesis
if (type.match(/^(\[\]|\{\})$/)) {
return `${prefix} ${unStyledCodeBlock(type)}`;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant