Sha256: 64a3438f42cfcead1f7122a65b3b7b51202dd1187e391a0522ff09bb761058b4

Contents?: true

Size: 1.34 KB

Versions: 50

Compression:

Stored size: 1.34 KB

Contents

# frozen_string_literal: true
# typed: true
# rubocop:disable PrisonGuard/NoTopLevelDeclarations, PrisonGuard/PackageMatchesDirectory

# 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} # rubocop:disable PrisonGuard/PrivateModule
    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

# rubocop:enable PrisonGuard/NoTopLevelDeclarations, PrisonGuard/PackageMatchesDirectory

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
sorbet-runtime-0.4.4321 lib/types/sig.rb
sorbet-runtime-0.4.4320 lib/types/sig.rb
sorbet-runtime-0.4.4319 lib/types/sig.rb
sorbet-runtime-0.4.4318 lib/types/sig.rb
sorbet-runtime-0.4.4314 lib/types/sig.rb
sorbet-runtime-0.4.4313 lib/types/sig.rb
sorbet-runtime-0.4.4312 lib/types/sig.rb
sorbet-runtime-0.4.4311 lib/types/sig.rb
sorbet-runtime-0.4.4310 lib/types/sig.rb
sorbet-runtime-0.4.4309 lib/types/sig.rb
sorbet-runtime-0.4.4308 lib/types/sig.rb
sorbet-runtime-0.4.4307 lib/types/sig.rb
sorbet-runtime-0.4.4306 lib/types/sig.rb
sorbet-runtime-0.4.4305 lib/types/sig.rb
sorbet-runtime-0.4.4304 lib/types/sig.rb
sorbet-runtime-0.4.4303 lib/types/sig.rb
sorbet-runtime-0.4.4302 lib/types/sig.rb
sorbet-runtime-0.4.4301 lib/types/sig.rb
sorbet-runtime-0.4.4300 lib/types/sig.rb
sorbet-runtime-0.4.4299 lib/types/sig.rb