Extensions

The following extensions are available globally.

FWTestCase

  • FWTestCase扩展,注意测试方法需标记@objc,让OC可以访问

    See more

FWWrapperCompatible

FWAnyEncoder

  • Declaration

    Swift

    extension JSONEncoder: FWAnyEncoder
  • Declaration

    Swift

    extension PropertyListEncoder: FWAnyEncoder
  • Encoder|Decoder协议暂不开放FWWrapper包装,防止协议fw属性和类fw属性重复声明冲突

    协议使用FWWrapper示例: extension Encoder { public var fw: FWWrapper { return FWWrapper(self) } } extension FWWrapper where Base == Encoder { }

    See more

    Declaration

    Swift

    extension Encoder

FWAnyDecoder

FWSafeValue

  • 可选类安全转换,不为nil

    Optional类暂不开放FWWrapper包装,防止Optional类fw属性和Wrapped类fw属性重复声明冲突

    See more

    Declaration

    Swift

    extension Optional
    extension Optional where Wrapped: FWSafeType