Skip to content

Commit

Permalink
Fix readme predicate-aware factory example typo (#185)
Browse files Browse the repository at this point in the history
  • Loading branch information
kootoopas committed Nov 15, 2021
1 parent 13a09f7 commit 1a9c0bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -413,7 +413,8 @@ has an optional parameter to resolve fresh each time.
import {predicateAwareClassFactory} from "tsyringe";

{
token: useFactory: predicateAwareClassFactory<Foo>(
token: "FooHttp",
useFactory: predicateAwareClassFactory<Foo>(
c => c.resolve(Bar).useHttps, // Predicate for evaluation
FooHttps, // A FooHttps will be resolved from the container if predicate is true
FooHttp // A FooHttp will be resolved if predicate is false
Expand Down

0 comments on commit 1a9c0bd

Please sign in to comment.