This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
@dynamicMemberLookup | |
final class DynamicUserDefaults { | |
static var standard: DynamicUserDefaults { | |
return DynamicUserDefaults(.standard) | |
} | |
private let keys = Keys() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import kotlin.native.internal.GC as internalGC | |
/** | |
* https://github.com/JetBrains/kotlin/blob/1.5.30/kotlin-native/runtime/src/main/kotlin/kotlin/native/internal/GC.kt | |
*/ | |
object GC { | |
var threshold: Int | |
get() = internalGC.threshold | |
set(value) { internalGC.threshold = value } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Combine | |
import FirebaseAuth | |
public struct CombineAuth { | |
fileprivate let auth: Auth | |
} | |
extension CombineAuth { | |
public enum Error: Swift.Error { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// WPTextAttachment.h | |
// ReadArticle | |
// | |
// Created by Moore, Stuart on 12/27/13. | |
// Copyright (c) 2013 The Washington Post. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Combine | |
import SwiftUI | |
struct ContentView: View { | |
@ObservedObject var viewModel = ViewModel() | |
var body: some View { | |
Button("Refresh") { viewModel.objectWillChange.send() } | |
ScrollView(.vertical) { | |
LazyVStack { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pod::Spec.new do |spec| | |
module PrivateRepository | |
class Spec | |
attr_reader :version | |
attr_reader :homepage | |
attr_reader :source | |
def initialize(owner, name, version, source) | |
@version = version | |
@homepage = "https://github.com/#{owner}/#{name}" | |
@source = source |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum _Value<Initial, Changed> { | |
case initial(Initial) | |
case changed(Changed) | |
} | |
typealias StateRepresentable<T> = _Value<T, T> | |
typealias ChangeHandleable<T> = _Value<Void, T> | |
extension _Value where Initial == Void { | |
static func initial() -> _Value<Void, Changed> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Playgroundでの実行を想定しているのでCombineを利用 | |
import Combine | |
// MARK: - CombineをRxSwiftのように定義する | |
typealias Observable<T> = AnyPublisher<T, Error> | |
typealias PublishRelay<T> = PassthroughSubject<T, Never> | |
typealias BehaviorRelay<T> = CurrentValueSubject<T, Never> | |
typealias DisposeBag = [AnyCancellable] | |
// MARK: - Output関連 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Playgroundでの実行を想定しているのでCombineを利用 | |
import Combine | |
// MARK: - CombineをRxSwiftのように定義する | |
typealias Observable<T> = AnyPublisher<T, Error> | |
typealias PublishRelay<T> = PassthroughSubject<T, Never> | |
typealias BehaviorRelay<T> = CurrentValueSubject<T, Never> | |
typealias DisposeBag = [AnyCancellable] | |
/// valueのsetterを非公開にしたBehaviorRelay |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@startuml | |
package Reversi.app { | |
class ViewController { | |
~ viewModel: ReversiViewModelType | |
} | |
} | |
package ReversiLogic.framework { | |
class ReversiViewModel { | |
+ input: InputWrapper<ReversiViewModel.Input> |
NewerOlder