Skip to content

Commit b97574e

Browse files
committed
don't typealias
1 parent ab56b58 commit b97574e

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ Run `seed install`.
120120
##API
121121
Constructors
122122
-----------
123-
`init(var socketURL: String, options: SocketOptionsSet? = nil)` - Creates a new SocketIOClient. opts is a Set of SocketIOClientOption. If your socket.io server is secure, you need to specify `https` in your socketURL.
123+
`init(var socketURL: String, options: Set<SocketIOClientOption>? = nil)` - Creates a new SocketIOClient. opts is a Set of SocketIOClientOption. If your socket.io server is secure, you need to specify `https` in your socketURL.
124124
`convenience init(socketURL: String, options: NSDictionary?)` - Same as above, but meant for Objective-C. See Options on how convert between SocketIOClientOptions and dictionary keys.
125125

126126
Options

SocketIOClientSwift/SocketIOClient.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public final class SocketIOClient: NSObject, SocketEngineClient {
3232
public private(set) var status = SocketIOClientStatus.NotConnected
3333

3434
public var nsp = "/"
35-
public var options: SocketOptionsSet?
35+
public var options: Set<SocketIOClientOption>?
3636
public var reconnects = true
3737
public var reconnectWait = 10
3838
public var sid: String? {
@@ -57,7 +57,7 @@ public final class SocketIOClient: NSObject, SocketEngineClient {
5757
/**
5858
Type safe way to create a new SocketIOClient. opts can be omitted
5959
*/
60-
public init(var socketURL: String, options: SocketOptionsSet? = nil) {
60+
public init(var socketURL: String, options: Set<SocketIOClientOption>? = nil) {
6161
if socketURL["https://"].matches().count != 0 {
6262
self.secure = true
6363
}

SocketIOClientSwift/SocketIOClientOption.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ public enum SocketIOClientOption: CustomStringConvertible, Hashable {
9191
return Mirror(reflecting: self).children.first?.value as? AnyObject
9292
}
9393

94-
static func NSDictionaryToSocketOptionsSet(dict: NSDictionary) -> SocketOptionsSet {
95-
var options = SocketOptionsSet()
94+
static func NSDictionaryToSocketOptionsSet(dict: NSDictionary) -> Set<SocketIOClientOption> {
95+
var options = Set<SocketIOClientOption>()
9696

9797
for (rawKey, value) in dict {
9898
if let key = rawKey as? String, opt = keyValueToSocketIOClientOption(key, value: value) {
@@ -103,7 +103,7 @@ public enum SocketIOClientOption: CustomStringConvertible, Hashable {
103103
return options
104104
}
105105

106-
static func SocketOptionsSetToNSDictionary(set: SocketOptionsSet) -> NSDictionary {
106+
static func SocketOptionsSetToNSDictionary(set: Set<SocketIOClientOption>) -> NSDictionary {
107107
let options = NSMutableDictionary()
108108

109109
for option in set {

SocketIOClientSwift/SocketTypes.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import Foundation
2727
public typealias AckCallback = ([AnyObject]) -> Void
2828
public typealias NormalCallback = ([AnyObject], SocketAckEmitter?) -> Void
2929
public typealias OnAckCallback = (timeoutAfter: UInt64, callback: AckCallback) -> Void
30-
public typealias SocketOptionsSet = Set<SocketIOClientOption>
3130

3231
enum Either<E, V> {
3332
case Left(E)

0 commit comments

Comments
 (0)