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.4298 lib/types/sig.rb
sorbet-runtime-0.4.4297 lib/types/sig.rb
sorbet-runtime-0.4.4296 lib/types/sig.rb
sorbet-runtime-0.4.4295 lib/types/sig.rb
sorbet-runtime-0.4.4294 lib/types/sig.rb
sorbet-runtime-0.4.4293 lib/types/sig.rb
sorbet-runtime-0.4.4292 lib/types/sig.rb
sorbet-runtime-0.4.4289 lib/types/sig.rb
sorbet-runtime-0.4.4288 lib/types/sig.rb
sorbet-runtime-0.4.4287 lib/types/sig.rb
sorbet-runtime-0.4.4286 lib/types/sig.rb
sorbet-runtime-0.4.4285 lib/types/sig.rb
sorbet-runtime-0.4.4284 lib/types/sig.rb
sorbet-runtime-0.4.4283 lib/types/sig.rb
sorbet-runtime-0.4.4282 lib/types/sig.rb
sorbet-runtime-0.4.4280 lib/types/sig.rb
sorbet-runtime-0.4.4279 lib/types/sig.rb
sorbet-runtime-0.4.4277 lib/types/sig.rb
sorbet-runtime-0.4.4276 lib/types/sig.rb
sorbet-runtime-0.4.4275 lib/types/sig.rb