module VersionGem
  module Epoch
    EPOCH_SIZE: Integer

    # Hook used when this module is extended
    def self.extended: (untyped) -> void

    module OverloadApiForEpoch
      # The epoch component (derived)
      def epoch: () -> Integer

      # Override of Api#major returning the derived major component
      def major: () -> Integer

      # Hash representation including epoch
      def to_h: () -> Hash[Symbol, (Integer | String | nil)]

      # Array of components [epoch, major, minor, patch, pre]
      def to_a: () -> Array[Integer | String | nil]

      private

      def _major: () -> Integer
    end
  end
end
