@@ -206,7 +206,7 @@ public final class Definition<T, U>: DefinitionType {
206206
207207 //definitions for types that can be resolved by `forwardsTo` definition
208208 //can also be used to resolve self type and it's implementing types
209- //this way container properly reuses previosly resolved instances
209+ //this way container properly reuses previously resolved instances
210210 //when there are several forwarded definitions
211211 //see testThatItReusesInstanceResolvedByTypeForwarding)
212212 for definition in forwardsTo. forwardsFrom {
@@ -292,17 +292,17 @@ class DefinitionBuilder<T, U> {
292292
293293typealias KeyDefinitionPair = ( key: DefinitionKey , definition: _Definition )
294294
295- /// Definitions are matched if they are registered for the same tag and thier factories accept the same number of runtime arguments.
295+ /// Definitions are matched if they are registered for the same tag and their factories accept the same number of runtime arguments.
296296private func ~= ( lhs: KeyDefinitionPair , rhs: KeyDefinitionPair ) -> Bool {
297297 guard lhs. key. type == rhs. key. type else { return false }
298298 guard lhs. key. tag == rhs. key. tag else { return false }
299299 guard lhs. definition. numberOfArguments == rhs. definition. numberOfArguments else { return false }
300300 return true
301301}
302302
303- /// Returns key-defintion pairs with definitions able to resolve that type (directly or via type forwarding)
303+ /// Returns key-definition pairs with definitions able to resolve that type (directly or via type forwarding)
304304/// and which tag matches provided key's tag or is nil if strictByTag is false.
305- /// In the end filters defintions by type of runtime arguments.
305+ /// In the end filters definitions by type of runtime arguments.
306306func filter( definitions _definitions: [ KeyDefinitionPair ] , byKey key: DefinitionKey , strictByTag: Bool = false , byTypeOfArguments: Bool = false ) -> [ KeyDefinitionPair ] {
307307 let definitions = _definitions
308308 . filter ( { $0. key. type == key. type || $0. definition. doesImplements ( type: key. type) } )
0 commit comments