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.4382 lib/types/sig.rb
sorbet-runtime-0.4.4381 lib/types/sig.rb
sorbet-runtime-0.4.4380 lib/types/sig.rb
sorbet-runtime-0.4.4379 lib/types/sig.rb
sorbet-runtime-0.4.4378 lib/types/sig.rb
sorbet-runtime-0.4.4375 lib/types/sig.rb
sorbet-runtime-0.4.4374 lib/types/sig.rb
sorbet-runtime-0.4.4373 lib/types/sig.rb
sorbet-runtime-0.4.4372 lib/types/sig.rb
sorbet-runtime-0.4.4371 lib/types/sig.rb
sorbet-runtime-0.4.4369 lib/types/sig.rb
sorbet-runtime-0.4.4368 lib/types/sig.rb
sorbet-runtime-0.4.4367 lib/types/sig.rb
sorbet-runtime-0.4.4366 lib/types/sig.rb
sorbet-runtime-0.4.4365 lib/types/sig.rb
sorbet-runtime-0.4.4364 lib/types/sig.rb
sorbet-runtime-0.4.4363 lib/types/sig.rb
sorbet-runtime-0.4.4362 lib/types/sig.rb
sorbet-runtime-0.4.4361 lib/types/sig.rb
sorbet-runtime-0.4.4359 lib/types/sig.rb