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

replace injected svc names with symbols #110

Closed
5 tasks done
ssube opened this issue Jan 6, 2019 · 0 comments
Closed
5 tasks done

replace injected svc names with symbols #110

ssube opened this issue Jan 6, 2019 · 0 comments
Assignees
Labels
scope/bot status/fixed issues that have been fixed and confirmed type/feature
Milestone

Comments

@ssube
Copy link
Owner

ssube commented Jan 6, 2019

Summary

The services injected via BotModule use magic names like 'storage' and 'clock'. These are far too common.

With a small tweak, noice can keep symbols intact end-to-end. TS allows unique symbols as interface member keys, so type safety will remain intact.

Scope

  • replace names with symbols
    • base
    • bot
  • make services optional
    • check them in ctor with mustExist

Use Case

Will remove two potential issues:

  1. services are optional if not requested in @Inject
  2. basic services conflict with bot services, each other, etc

Questions

The necessary change in noice is: ssube/noicejs@1750df5
Needs to be released before this is merged.

@ssube ssube added this to the 1.0 - stable milestone Jan 6, 2019
@ssube ssube self-assigned this Jan 6, 2019
@ssube ssube removed the status/new label Jan 6, 2019
@ssube ssube mentioned this issue Jan 6, 2019
8 tasks
@ssube ssube added status/fixed issues that have been fixed and confirmed and removed status/progress issues that are in progress labels Jan 6, 2019
@ssube ssube closed this as completed Jan 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope/bot status/fixed issues that have been fixed and confirmed type/feature
Projects
None yet
Development

No branches or pull requests

1 participant