class StrongJSON def initialize: { (StrongJSON) -> void } -> untyped def let: (Symbol, ty) -> void include Types VERSION: String interface _Schema[T] def coerce: (untyped, ?path: Type::ErrorPath) -> T def =~: (untyped) -> bool def to_s: -> String def is_a?: (untyped) -> bool def `alias`: -> Symbol? def with_alias: (Symbol) -> self def ==: (untyped) -> bool def yield_self: [X] () { (self) -> X } -> X end type ty = _Schema[untyped] module Types def object: [X] (Hash[Symbol, ty]) -> Type::Object[X] | () -> Type::Object[bot] def object?: [X] (Hash[Symbol, ty]) -> Type::Optional[X] | () -> Type::Optional[bot] def any: () -> Type::Base[untyped] def any?: () -> Type::Optional[untyped] def optional: [X] (_Schema[X]) -> Type::Optional[X] | () -> Type::Optional[untyped] def string: () -> Type::Base[String] def string?: () -> Type::Optional[String] def number: () -> Type::Base[Numeric] def number?: () -> Type::Optional[Numeric] def numeric: () -> Type::Base[Numeric] def numeric?: () -> Type::Optional[Numeric] def integer: () -> Type::Base[Integer] def integer?: () -> Type::Optional[Integer] def boolean: () -> Type::Base[bool] def boolean?: () -> Type::Optional[bool] def symbol: () -> Type::Base[Symbol] def symbol?: () -> Type::Optional[Symbol] def array: [X] (_Schema[X]) -> Type::Array[X] | () -> Type::Array[untyped] def array?: [X] (_Schema[X]) -> Type::Optional[::Array[X]] def literal: [X] (X) -> Type::Literal[X] def literal?: [X] (X) -> Type::Optional[X] def enum: [X] (*_Schema[untyped], ?detector: Type::detector?) -> Type::Enum[X] def enum?: [X] (*_Schema[untyped], ?detector: Type::detector?) -> Type::Optional[X] def hash: [X] (_Schema[X]) -> Type::Hash[X] def hash?: [X] (_Schema[X]) -> Type::Optional[Hash[Symbol, X]] end class ErrorReporter attr_reader path: Type::ErrorPath @string: String def initialize: (path: Type::ErrorPath) -> untyped def format: -> void def pretty_str: (ty, ?expand_alias: bool) -> ::String private def format_trace: (path: Type::ErrorPath, ?index: Integer) -> void def format_aliases: (path: Type::ErrorPath, where: ::Array[String]) -> ::Array[String] def format_single_alias: (Symbol, ty) -> String def pretty: (ty, PrettyPrint, ?expand_alias: bool) -> void end end