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.4432 lib/types/sig.rb
sorbet-runtime-0.4.4429 lib/types/sig.rb
sorbet-runtime-0.4.4428 lib/types/sig.rb
sorbet-runtime-0.4.4427 lib/types/sig.rb
sorbet-runtime-0.4.4426 lib/types/sig.rb
sorbet-runtime-0.4.4425 lib/types/sig.rb
sorbet-runtime-0.4.4423 lib/types/sig.rb
sorbet-runtime-0.4.4422 lib/types/sig.rb
sorbet-runtime-0.4.4421 lib/types/sig.rb
sorbet-runtime-0.4.4419 lib/types/sig.rb
sorbet-runtime-0.4.4418 lib/types/sig.rb
sorbet-runtime-0.4.4417 lib/types/sig.rb
sorbet-runtime-0.4.4416 lib/types/sig.rb
sorbet-runtime-0.4.4415 lib/types/sig.rb
sorbet-runtime-0.4.4413 lib/types/sig.rb
sorbet-runtime-0.4.4412 lib/types/sig.rb
sorbet-runtime-0.4.4411 lib/types/sig.rb
sorbet-runtime-0.4.4410 lib/types/sig.rb
sorbet-runtime-0.4.4408 lib/types/sig.rb
sorbet-runtime-0.4.4405 lib/types/sig.rb