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

fix: Span being incompatible with MethodDecorator type #465

Merged
merged 1 commit into from
Feb 24, 2024
Merged

fix: Span being incompatible with MethodDecorator type #465

merged 1 commit into from
Feb 24, 2024

Conversation

mertalev
Copy link
Contributor

@mertalev mertalev commented Feb 23, 2024

The decorator returned by Span specifies the propertyKey field as string, while the TypeScript MethodDecorator type requires it to allow symbol as well.

This is relevant as it can cause type conflicts when used with functions that expect a MethodDecorator. An example of this is the decorate-all package used to apply a decorator to all methods of a class.

This PR updates the typing and adds a unit test for symbols.

@mertalev mertalev changed the title fix: Span being incompatible with MethodDescriptor type fix: Span being incompatible with MethodDecorator type Feb 23, 2024
@pragmaticivan
Copy link
Owner

Thanks!

@pragmaticivan pragmaticivan merged commit 388bd50 into pragmaticivan:main Feb 24, 2024
3 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