Sha256: 2d30504a2d151ceb87417720d7000c55e80f62f4286e6ef4e8dedc7e3a2cba0a

Contents?: true

Size: 1.46 KB

Versions: 4

Compression:

Stored size: 1.46 KB

Contents

# typed: strict
require "action_dispatch/journey/route"
require "pathname"
require "sorbet-runtime"

module JsRoutes
  module Types
    extend T::Sig

    UntypedArray = T.type_alias {T::Array[T.untyped]}
    StringArray = T.type_alias {T::Array[String]}
    SymbolArray = T.type_alias {T::Array[Symbol]}
    StringHash = T.type_alias { T::Hash[String, T.untyped] }
    Options = T.type_alias { T::Hash[Symbol, T.untyped] }
    SpecNode = T.type_alias { T.any(String, RouteSpec, NilClass) }
    Literal = T.type_alias { T.any(String, Symbol) }
    JourneyRoute = T.type_alias{ActionDispatch::Journey::Route}
    RouteSpec = T.type_alias {T.untyped}
    Application = T.type_alias do
      T.any(T::Class[Rails::Engine], Rails::Application)
    end
    ApplicationCaller = T.type_alias do
      T.any(Application, T.proc.returns(Application))
    end
    BannerCaller = T.type_alias do
      T.any(String, NilClass, T.proc.returns(T.any(String, NilClass)))
    end
    Clusivity = T.type_alias { T.any(Regexp, T::Array[Regexp]) }
    FileName = T.type_alias { T.any(String, Pathname, NilClass) }
    ConfigurationBlock = T.type_alias do
      T.proc.params(arg0: JsRoutes::Configuration).void
    end
    Prefix = T.type_alias do
      T.any(T.proc.returns(String), String, NilClass)
    end

    module RackApp
      extend T::Sig
      extend T::Helpers

      interface!

      sig { abstract.params(input: StringHash).returns(UntypedArray) }
      def call(input); end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
js-routes-2.3.5 lib/js_routes/types.rb
js-routes-2.3.4 lib/js_routes/types.rb
js-routes-2.3.3 lib/js_routes/types.rb
js-routes-2.3.2 lib/js_routes/types.rb