[TCGC] `__raw` of `SdkCredentialType` is the `namespace` instead of the decorator itself
- Dominant language
- TypeScript
- Stars
- 27
- Forks
- 90
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 156
Description
As we all know, `SdkCredentialType` corresponds to the `@useAuth` decorator, but its `__raw` is the namespace with that decorator instead of the decorator itself.
This would lead to when we want to report something wrong for the auth, the diagnostic will show up on the namespace instead of the auth itself.

This would be so confusing because in a lot of cases, the target of a decorator could be in a different file from the decorator itself.
For instance, if we have:
```
@useAuth(ApiKeyAuth)
namespace Service;
```
We should have the raw corresponding to the `ApiKeyAuth` part, or at least the decorator itself.
Contributor guide
Assessment
This issue has not been assessed yet.