Skip to content

refactor: Use InjectionToken for Configuration #76

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

olegmingaleev
Copy link

@olegmingaleev olegmingaleev commented Aug 8, 2025

Use an InjectionToken instead of a string token for configuration.

Changes

Key Changes

•	Added InjectionToken: Introduced FILESTACK_CONFIG token for strongly-typed configuration injection
•	Updated Module: FilestackModule now uses the InjectionToken instead of a string token
•	Updated Service: FilestackService now injects configuration via InjectionToken

Benefits

Typing

•	Better Typing: InjectionToken ensures strict typing of the configuration
•	Type Safety: Prevents errors when using incorrect tokens

Security

•	Unique Tokens: InjectionToken guarantees uniqueness within the application
•	Conflict Prevention: Eliminates potential token name conflicts

@olegmingaleev olegmingaleev marked this pull request as ready for review August 8, 2025 10:10
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.

1 participant