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.4404 lib/types/sig.rb
sorbet-runtime-0.4.4403 lib/types/sig.rb
sorbet-runtime-0.4.4402 lib/types/sig.rb
sorbet-runtime-0.4.4401 lib/types/sig.rb
sorbet-runtime-0.4.4400 lib/types/sig.rb
sorbet-runtime-0.4.4399 lib/types/sig.rb
sorbet-runtime-0.4.4397 lib/types/sig.rb
sorbet-runtime-0.4.4398 lib/types/sig.rb
sorbet-runtime-0.4.4392 lib/types/sig.rb
sorbet-runtime-0.4.4394 lib/types/sig.rb
sorbet-runtime-0.4.4393 lib/types/sig.rb
sorbet-runtime-0.4.4391 lib/types/sig.rb
sorbet-runtime-0.4.4390 lib/types/sig.rb
sorbet-runtime-0.4.4389 lib/types/sig.rb
sorbet-runtime-0.4.4388 lib/types/sig.rb
sorbet-runtime-0.4.4387 lib/types/sig.rb
sorbet-runtime-0.4.4386 lib/types/sig.rb
sorbet-runtime-0.4.4385 lib/types/sig.rb
sorbet-runtime-0.4.4384 lib/types/sig.rb
sorbet-runtime-0.4.4383 lib/types/sig.rb