Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
… into vanilla
  • Loading branch information
loganvolkers authored Sep 20, 2023
2 parents 387577d + 5dbd501 commit 1c87a41
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions website/src/content/docs/advanced/interfaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ sidebar:
Sometimes you don't care about the implementation details. Your molecules need a dependency, but it doesn't matter where it comes from or how it's
implemented. Bunshi supports **interfaces** as a tool to fix this problem.

An interface defines a depencency, but not the implementation for the dependency or how it gets created.
An interface defines a dependency, but not the implementation for the dependency or how it gets created.

## API

In other programming languages interfaces can be referenced at build time or runtime, but Javascript doesn't have interfaces and
Typescript interfaceds don't exist at runtime.
Typescript interfaces don't exist at runtime.

Bunshi has `moleculeInterface` to create molecule interfaces that can be referenced and used at runtime.

Expand Down Expand Up @@ -53,4 +53,4 @@ export const RegistrationFormMolecule = molecule((mol) => {
* Interfaces don't specify if they are scoped or not. Write your molecules accordingly.
* Bindings to interfaces have to be done in [injectors](/advanced/injectors).
* If you have a default implementation for an interface, then just use a `molecule` instead.
* [Scopes](/concepts/scopes) can act as a replacement for interfaces if you have a large number of implementations
* [Scopes](/concepts/scopes) can act as a replacement for interfaces if you have a large number of implementations

0 comments on commit 1c87a41

Please sign in to comment.