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.4274 lib/types/sig.rb
sorbet-runtime-0.4.4273 lib/types/sig.rb
sorbet-runtime-0.4.4272 lib/types/sig.rb
sorbet-runtime-0.4.4271 lib/types/sig.rb
sorbet-runtime-0.4.4270 lib/types/sig.rb
sorbet-runtime-0.4.4269 lib/types/sig.rb
sorbet-runtime-0.4.4263 lib/types/sig.rb
sorbet-runtime-0.4.4262 lib/types/sig.rb
sorbet-runtime-0.4.4261 lib/types/sig.rb
sorbet-runtime-0.4.4260 lib/types/sig.rb