Skip to content

Commit 95d7d5a

Browse files
authored
Fix typos in documentation. (#69)
1 parent 3889b96 commit 95d7d5a

File tree

13 files changed

+32
-32
lines changed

13 files changed

+32
-32
lines changed

Sources/SymbolKit/Mixin/Mixin+Equals.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@
1111
import Foundation
1212

1313
// `Mixin` does not conform to `Equatable` right now primarily because
14-
// this would complicate its usage in many situtations because of "Self
14+
// this would complicate its usage in many situations because of "Self
1515
// or associated type" requirements errors. Thus, in order to compare
1616
// `Mixin`s for equality, we need to somehow get access to the `Mixin`'s
1717
// `Equatable` conformance and the `==(lhs:rhs:)` function specifically.
1818
//
19-
// Note that all of this would be siginificantly easier in Swift 5.7, so
19+
// Note that all of this would be significantly easier in Swift 5.7, so
2020
// it might be worth updating the implementation once SymbolKit adopts
2121
// Swift 5.7 as its minimum language requirement.
2222

2323

2424
// When working with `Mixin` values in a generic (non-specific) context,
2525
// we only know their value conforms to the existential type `Mixin`. This
26-
// extension to `Mixin` and the `equals` property defined in it is essentiall for
26+
// extension to `Mixin` and the `equals` property defined in it is essential for
2727
// the whole process to work:
2828
// The `equals` property does not expose the `Self` type in its interface and
2929
// therefore is accessible from the existential type `Mixin`. Inside `equals`,

Sources/SymbolKit/Mixin/Mixin+Hash.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@
1111
import Foundation
1212

1313
// `Mixin` does not conform to `Hashable` right now primarily because
14-
// this would complicate its usage in many situtations because of "Self
14+
// this would complicate its usage in many situations because of "Self
1515
// or associated type" requirements errors. `Hashable` inherits those
1616
// frome `Equatable`, even though its primary functionality, the `hash(into:)`
1717
// function has no Self or associated type requirements. Thus, in order to
1818
// access a `Mixin`'s `hash(into:)` function, we need to somehow get access to
1919
// the `Mixin`'s `Hashable` conformance.
2020
//
21-
// Note that all of this would be siginificantly easier in Swift 5.7, so
21+
// Note that all of this would be significantly easier in Swift 5.7, so
2222
// it might be worth updating the implementation once SymbolKit adopts
2323
// Swift 5.7 as its minimum language requirement.
2424

2525

2626
// When working with `Mixin` values in a generic (non-specific) context,
2727
// we only know their value conforms to the existential type `Mixin`. This
28-
// extension to `Mixin` and the `hash` property defined in it is essentiall for
28+
// extension to `Mixin` and the `hash` property defined in it is essential for
2929
// the whole process to work:
3030
// The `hash` property does not expose the `Self` type in its interface and
3131
// therefore is accessible from the existential type `Mixin`. Inside `hash`,

Sources/SymbolKit/Mixin/Mixin.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ extension MixinCodingInformation {
101101
public protocol SingleValueMixin: Mixin {
102102
/// The type of the wrapped value.
103103
associatedtype ValueType: Codable
104-
/// The property holded the encoded/decoded value.
104+
/// The property holding the encoded/decoded value.
105105
var value: ValueType { get set }
106106
/// The constructor for the concrete type, taking just the wrapped value as its argument.
107107
init(_: ValueType)

Sources/SymbolKit/SymbolGraph/Module.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ extension SymbolGraph {
2222
/// The platform intended for deployment.
2323
public var platform: Platform
2424

25-
/// The [semantic version](https://semver.org) of the module, if availble.
25+
/// The [semantic version](https://semver.org) of the module, if available.
2626
public var version: SemanticVersion?
2727

2828
/// `true` if the module represents a virtual module, not created from source,

Sources/SymbolKit/SymbolGraph/Relationship/Relationship.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ extension SymbolGraph.Relationship {
145145
/// decoding relationships.
146146
///
147147
/// If ``SymbolGraph/Relationship`` does not know the concrete type of a ``Mixin``, it cannot encode
148-
/// or decode that type and thus skipps such entries. Note that ``Mixin``s that occur on relationships
148+
/// or decode that type and thus skips such entries. Note that ``Mixin``s that occur on relationships
149149
/// in the default symbol graph format do not have to be registered!
150150
///
151151
/// - Parameter userInfo: A property which allows editing the `userInfo` member of the
@@ -154,7 +154,7 @@ extension SymbolGraph.Relationship {
154154
/// You can log warnings and either re-throw or consume the error.
155155
/// - Parameter onDecodingError: Defines the behavior when an error occurs while decoding these types of ``Mixin``s.
156156
/// Next to logging warnings, the function allows for either re-throwing the error,
157-
/// skipping the errornous entry, or providing a default value.
157+
/// skipping the erroneous entry, or providing a default value.
158158
public static func register<M: Sequence>(mixins mixinTypes: M,
159159
to userInfo: inout [CodingUserInfoKey: Any],
160160
onEncodingError: ((_ error: Error, _ mixin: Mixin) throws -> Void)?,
@@ -181,14 +181,14 @@ public extension JSONEncoder {
181181
/// Register types conforming to ``Mixin`` so they can be included when encoding relationships.
182182
///
183183
/// If ``SymbolGraph/Relationship`` does not know the concrete type of a ``Mixin``, it cannot encode
184-
/// that type and thus skipps such entries. Note that ``Mixin``s that occur on relationships
184+
/// that type and thus skips such entries. Note that ``Mixin``s that occur on relationships
185185
/// in the default symbol graph format do not have to be registered!
186186
///
187187
/// - Parameter onEncodingError: Defines the behavior when an error occurs while encoding these types of ``Mixin``s.
188188
/// You can log warnings and either re-throw or consume the error.
189189
/// - Parameter onDecodingError: Defines the behavior when an error occurs while decoding these types of ``Mixin``s.
190190
/// Next to logging warnings, the function allows for either re-throwing the error,
191-
/// skipping the errornous entry, or providing a default value.
191+
/// skipping the erroneous entry, or providing a default value.
192192
func register(relationshipMixins mixinTypes: Mixin.Type...,
193193
onEncodingError: ((_ error: Error, _ mixin: Mixin) throws -> Void)? = nil,
194194
onDecodingError: ((_ error: Error) throws -> Mixin?)? = nil) {
@@ -203,14 +203,14 @@ public extension JSONDecoder {
203203
/// Register types conforming to ``Mixin`` so they can be included when decoding relationships.
204204
///
205205
/// If ``SymbolGraph/Relationship`` does not know the concrete type of a ``Mixin``, it cannot decode
206-
/// that type and thus skipps such entries. Note that ``Mixin``s that occur on relationships
206+
/// that type and thus skips such entries. Note that ``Mixin``s that occur on relationships
207207
/// in the default symbol graph format do not have to be registered!
208208
///
209209
/// - Parameter onEncodingError: Defines the behavior when an error occurs while encoding these types of ``Mixin``s.
210210
/// You can log warnings and either re-throw or consume the error.
211211
/// - Parameter onDecodingError: Defines the behavior when an error occurs while decoding these types of ``Mixin``s.
212212
/// Next to logging warnings, the function allows for either re-throwing the error,
213-
/// skipping the errornous entry, or providing a default value.
213+
/// skipping the erroneous entry, or providing a default value.
214214
func register(relationshipMixins mixinTypes: Mixin.Type...,
215215
onEncodingError: ((_ error: Error, _ mixin: Mixin) throws -> Void)? = nil,
216216
onDecodingError: ((_ error: Error) throws -> Mixin?)? = nil) {
@@ -259,7 +259,7 @@ extension SymbolGraph.Relationship: Hashable, Equatable {
259259
}
260260
}
261261

262-
/// A custom equality implmentation for a relationship.
262+
/// A custom equality implementation for a relationship.
263263
///
264264
/// - Note: ``Mixin``s that do not conform to `Equatable` will be ignored entirely, including their count and
265265
/// ``Mixin/mixinKey``.

Sources/SymbolKit/SymbolGraph/Symbol/Availability/Availability.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ extension SymbolGraph.Symbol {
2020
For example,
2121
a class introduced in iOS 11 would have:
2222

23-
- a availability domain of `"iOS"` and
23+
- an availability domain of `"iOS"` and
2424
- an `introduced` version of `11.0.0`.
2525

2626
As another example,

Sources/SymbolKit/SymbolGraph/Symbol/KindIdentifier.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ extension SymbolGraph.Symbol {
1919

2020
/// Create a new ``SymbolGraph/Symbol/KindIdentifier``.
2121
///
22-
/// - Note: Only use this initilaizer for defining a new kind. For initializing instances manually,
22+
/// - Note: Only use this initializer for defining a new kind. For initializing instances manually,
2323
/// copy the initial initializer. For extracting identifiers form raw strings, use ``init(identifier:)``.
2424
public init(rawValue: String) {
2525
self.rawValue = rawValue

Sources/SymbolKit/SymbolGraph/Symbol/Symbol.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ extension SymbolGraph.Symbol {
285285
/// decoding symbols.
286286
///
287287
/// If ``SymbolGraph/Symbol`` does not know the concrete type of a ``Mixin``, it cannot encode
288-
/// or decode that type and thus skipps such entries. Note that ``Mixin``s that occur on symbols
288+
/// or decode that type and thus skips such entries. Note that ``Mixin``s that occur on symbols
289289
/// in the default symbol graph format do not have to be registered!
290290
///
291291
/// - Parameter userInfo: A property which allows editing the `userInfo` member of the
@@ -294,7 +294,7 @@ extension SymbolGraph.Symbol {
294294
/// You can log warnings and either re-throw or consume the error.
295295
/// - Parameter onDecodingError: Defines the behavior when an error occurs while decoding these types of ``Mixin``s.
296296
/// Next to logging warnings, the function allows for either re-throwing the error,
297-
/// skipping the errornous entry, or providing a default value.
297+
/// skipping the erroneous entry, or providing a default value.
298298
public static func register<M: Sequence>(mixins mixinTypes: M,
299299
to userInfo: inout [CodingUserInfoKey: Any],
300300
onEncodingError: ((_ error: Error, _ mixin: Mixin) throws -> Void)?,
@@ -322,14 +322,14 @@ public extension JSONEncoder {
322322
/// Register types conforming to ``Mixin`` so they can be included when encoding symbols.
323323
///
324324
/// If ``SymbolGraph/Symbol`` does not know the concrete type of a ``Mixin``, it cannot encode
325-
/// that type and thus skipps such entries. Note that ``Mixin``s that occur on symbols
325+
/// that type and thus skips such entries. Note that ``Mixin``s that occur on symbols
326326
/// in the default symbol graph format do not have to be registered!
327327
///
328328
/// - Parameter onEncodingError: Defines the behavior when an error occurs while encoding these types of ``Mixin``s.
329329
/// You can log warnings and either re-throw or consume the error.
330330
/// - Parameter onDecodingError: Defines the behavior when an error occurs while decoding these types of ``Mixin``s.
331331
/// Next to logging warnings, the function allows for either re-throwing the error,
332-
/// skipping the errornous entry, or providing a default value.
332+
/// skipping the erroneous entry, or providing a default value.
333333
func register(symbolMixins mixinTypes: Mixin.Type...,
334334
onEncodingError: ((_ error: Error, _ mixin: Mixin) throws -> Void)? = nil,
335335
onDecodingError: ((_ error: Error) throws -> Mixin?)? = nil) {
@@ -344,14 +344,14 @@ public extension JSONDecoder {
344344
/// Register types conforming to ``Mixin`` so they can be included when decoding symbols.
345345
///
346346
/// If ``SymbolGraph/Symbol`` does not know the concrete type of a ``Mixin``, it cannot decode
347-
/// that type and thus skipps such entries. Note that ``Mixin``s that occur on symbols
347+
/// that type and thus skips such entries. Note that ``Mixin``s that occur on symbols
348348
/// in the default symbol graph format do not have to be registered!
349349
///
350350
/// - Parameter onEncodingError: Defines the behavior when an error occurs while encoding these types of ``Mixin``s.
351351
/// You can log warnings and either re-throw or consume the error.
352352
/// - Parameter onDecodingError: Defines the behavior when an error occurs while decoding these types of ``Mixin``s.
353353
/// Next to logging warnings, the function allows for either re-throwing the error,
354-
/// skipping the errornous entry, or providing a default value.
354+
/// skipping the erroneous entry, or providing a default value.
355355
func register(symbolMixins mixinTypes: Mixin.Type...,
356356
onEncodingError: ((_ error: Error, _ mixin: Mixin) throws -> Void)? = nil,
357357
onDecodingError: ((_ error: Error) throws -> Mixin?)? = nil) {

Sources/SymbolKit/SymbolKit.docc/GraphFormatExtensions.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Define custom Symbol or Relationship kinds and store custom information in the g
44

55
## Overview
66

7-
SymbolKit makes it easy to parse Symbol Graph Files and inspect or edit the resulting graph's _contents_. However, sometimes you migth want to go beyond that by changing the _structure_ of the graph. SymbolKit allows you to define custom Symbol and Relationship kinds and lets you extend nodes and edges with custom properties.
7+
SymbolKit makes it easy to parse Symbol Graph Files and inspect or edit the resulting graph's _contents_. However, sometimes you might want to go beyond that by changing the _structure_ of the graph. SymbolKit allows you to define custom Symbol and Relationship kinds and lets you extend nodes and edges with custom properties.
88

99
## Defining Custom Symbol or Relationship Kinds
1010

@@ -22,7 +22,7 @@ extension SymbolGraph.Relationship.Kind {
2222
}
2323
```
2424

25-
Use these constants when manually initializing Symbols/Relationships of the respective kind instead of initilaizing new instances of ``SymbolGraph/Symbol/KindIdentifier`` / ``SymbolGraph/Relationship/Kind-swift.struct`` all the time.
25+
Use these constants when manually initializing Symbols/Relationships of the respective kind instead of initializing new instances of ``SymbolGraph/Symbol/KindIdentifier`` / ``SymbolGraph/Relationship/Kind-swift.struct`` all the time.
2626

2727
After defining a custom Symbol kind, make sure to register it using ``SymbolGraph/Symbol/KindIdentifier/register(_:)``. This ensures all static functionality defined on ``SymbolGraph/Symbol/KindIdentifier`` works as expected.
2828

@@ -42,7 +42,7 @@ Start out by defining the information you want to capture:
4242
```swift
4343
/// Commit metadata of the last commit that modified this Symbol.
4444
struct LastCommit: Mixin, Hashable {
45-
static let mixinKey = "lastCommit"
45+
static let mixinKey = "lastCommit"
4646

4747
let hash: String
4848
let date: Date
@@ -70,7 +70,7 @@ You can now easily edit this information on an existing Symbol Graph.
7070

7171
Before you can encode and decode this information, you need to register your custom Mixin on your encoder/decoder using ``SymbolGraph/Symbol/register(mixins:to:onEncodingError:onDecodingError:)`` (for ``SymbolGraph/Symbol``) or ``SymbolGraph/Relationship/register(mixins:to:onEncodingError:onDecodingError:)`` (for ``SymbolGraph/Relationship``). If you forget this step, you custom mixins will be ignored!
7272

73-
- Note: There exist handy shorcuts on Foundation's `JSONEncoder` and `JSONDecoder` for all the registration functions.
73+
- Note: There exist handy shortcuts on Foundation's `JSONEncoder` and `JSONDecoder` for all the registration functions.
7474

7575
```swift
7676
// prepare encoder and decoder to deal with custom mixin

Sources/SymbolKit/UnifiedSymbolGraph/GraphCollector.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public class GraphCollector {
3131

3232
/// Initialize a new collector for merging ``SymbolGraph``s into ``UnifiedSymbolGraph``s.
3333
///
34-
/// - Parameter extensionGraphAssociationStrategy: Optionally specifiy how extension graphs are to be merged.
34+
/// - Parameter extensionGraphAssociationStrategy: Optionally specify how extension graphs are to be merged.
3535
public init(extensionGraphAssociationStrategy: ExtensionGraphAssociation = .extendedGraph) {
3636
self.unifiedGraphs = [:]
3737
self.graphSources = [:]

0 commit comments

Comments
 (0)