Sha256: 84ee62dabada19e7d6f75c58ef270c82c3ab0ef19b521169050e2dc5e1fc1cfb
Contents?: true
Size: 443 Bytes
Versions: 18
Compression:
Stored size: 443 Bytes
Contents
# frozen_string_literal: true # This module provides additional functionality for working with Sorbet types. module SorbetExtension # Checks if the types in the collection include the NilClass type. # # @return [Boolean] true if the types include NilClass, false otherwise. def nilable? types.any? do |type| type.respond_to?(:raw_type) && type.raw_type == NilClass end end end T::Types::Union.include SorbetExtension
Version data entries
18 entries across 18 versions & 1 rubygems