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: Replace runtime enum BotKind with plain object #136

Merged
merged 4 commits into from
Aug 3, 2023

Conversation

dj-stormtrooper
Copy link
Contributor

@dj-stormtrooper dj-stormtrooper commented Aug 2, 2023

With new Sergey's idea BotD API remains unchanged, only runtime under-the-hood behaviour is different

src/index.ts Outdated Show resolved Hide resolved
@dj-stormtrooper dj-stormtrooper changed the title fix: Remove runtime enum for BotKind fix: Replace runtime enum BotKind with plain object Aug 3, 2023
src/types.ts Show resolved Hide resolved
Unknown = 'unknown',
}
export const BotKind = {
// Object is used instead of Typescript enum to avoid emitting IIFE which might be affected by further tree-shaking.
Copy link
Contributor Author

@dj-stormtrooper dj-stormtrooper Aug 3, 2023

Choose a reason for hiding this comment

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

Put the comment here because it's maintainer-faced info, don't think we need it in the JSDoc annotation

xnerhu
xnerhu previously approved these changes Aug 3, 2023
@xnerhu xnerhu merged commit 75ebd43 into main Aug 3, 2023
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.

3 participants