mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
24 lines
369 B
Swift
24 lines
369 B
Swift
public struct Flags {
|
|
public func asBoolean() -> Bool { return true }
|
|
}
|
|
|
|
public protocol Router : class {
|
|
|
|
}
|
|
|
|
extension Router {
|
|
public var flags: Flags { return Flags() }
|
|
}
|
|
|
|
public protocol Environment : class {
|
|
unowned var router: Router { get }
|
|
}
|
|
|
|
open class UI {
|
|
open unowned let environment: Environment
|
|
|
|
init(e: Environment) {
|
|
environment = e
|
|
}
|
|
}
|