typedi icon indicating copy to clipboard operation
typedi copied to clipboard

Executable Tokens

Open freshgum-bubbles opened this issue 1 year ago • 1 comments

The code for virtual tokens (such as HostContainer()) has been moved into individual tokens, as opposed to hosting logic for these tokens in ContainerInstance.

This means that we no longer have to check for individual tokens in the container's .get code-path, which has historically been the case.

Instead, logic for these tokens is now moved into special tokens called Executable Tokens.

This yields numerous advantages, one of which being that, should a certain special token go unused, its code can safely be removed from a bundle via dead-code elimination.

While this is mostly an internal change, the concept of Executable Tokens works quite well, and so I'm considering making it part of the public API surface + documentation after further testing.

Checklist:

  • [x] Testing

freshgum-bubbles avatar May 10 '24 15:05 freshgum-bubbles

🦋 Changeset detected

Latest commit: 33c60bfc77b8fcc6c906d53748ff034472d4eb5e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@freshgum/typedi Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

changeset-bot[bot] avatar May 10 '24 15:05 changeset-bot[bot]

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

github-actions[bot] avatar Jul 02 '24 01:07 github-actions[bot]