typestack / class-validator

Decorator-based property validation for classes.
MIT License
11.03k stars 800 forks source link

fix: `optionsArg` for `@IsMACAddress({}) is set to `any` type in VSCode #1653

Closed carlocorradini closed 1 year ago

carlocorradini commented 2 years ago

Description

When using @IsMACAddress({}) decorator the optionsArg is set to any in VSCode even though isMacAddress.d.ts has the correct type: image

I don't know if this is related to VSCode only or is a more general issue.

Minimal code-snippet showcasing the problem

class Test {
  // {} does not show any type hints
  @IsMACAddress({})
  address!: string;
}

Expected behavior

optionsArgs showing ValidatorJS.IsMACAddressOptions options.

Actual behavior

No type hint and optionsArg is set to any: image

NoNameProvided commented 1 year ago

Your types may be stuck, restarting your editor will solve the problem.

github-actions[bot] commented 1 year ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.