Sha256: 8b2028341c3737692edf13fe387d967a5bd560f2050d19ba9af5a86b95139360

Contents?: true

Size: 1.12 KB

Versions: 94

Compression:

Stored size: 1.12 KB

Contents

# frozen_string_literal: true
# typed: strict

# Used as a mixin to any class so that you can call `sig`.
# Docs at https://sorbet.org/docs/sigs
module T::Sig
  module WithoutRuntime
    # At runtime, does nothing, but statically it is treated exactly the same
    # as T::Sig#sig. Only use it in cases where you can't use T::Sig#sig.
    def self.sig(&blk); end # rubocop:disable PrisonGuard/BanBuiltinMethodOverride

    # At runtime, does nothing, but statically it is treated exactly the same
    # as T::Sig#sig. Only use it in cases where you can't use T::Sig#sig.
    T::Sig::WithoutRuntime.sig {params(blk: T.proc.bind(T::Private::Methods::DeclBuilder).void).void}
    def self.sig(&blk); end # rubocop:disable PrisonGuard/BanBuiltinMethodOverride, Lint/DuplicateMethods
  end

  # Declares a method with type signatures and/or
  # abstract/override/... helpers. See the documentation URL on
  # {T::Helpers}
  T::Sig::WithoutRuntime.sig {params(blk: T.proc.bind(T::Private::Methods::DeclBuilder).void).void}
  def sig(&blk) # rubocop:disable PrisonGuard/BanBuiltinMethodOverride
    T::Private::Methods.declare_sig(self, &blk)
  end
end

Version data entries

94 entries across 94 versions & 1 rubygems

Version Path
sorbet-runtime-0.4.4338 lib/types/sig.rb
sorbet-runtime-0.4.4337 lib/types/sig.rb
sorbet-runtime-0.4.4336 lib/types/sig.rb
sorbet-runtime-0.4.4334 lib/types/sig.rb
sorbet-runtime-0.4.4333 lib/types/sig.rb
sorbet-runtime-0.4.4332 lib/types/sig.rb
sorbet-runtime-0.4.4331 lib/types/sig.rb
sorbet-runtime-0.4.4330 lib/types/sig.rb
sorbet-runtime-0.4.4329 lib/types/sig.rb
sorbet-runtime-0.4.4328 lib/types/sig.rb
sorbet-runtime-0.4.4327 lib/types/sig.rb
sorbet-runtime-0.4.4326 lib/types/sig.rb
sorbet-runtime-0.4.4325 lib/types/sig.rb
sorbet-runtime-0.4.4324 lib/types/sig.rb