diff --git a/common/lib/dependabot/config/file.rb b/common/lib/dependabot/config/file.rb index 6dd9c2512d..4a58691541 100644 --- a/common/lib/dependabot/config/file.rb +++ b/common/lib/dependabot/config/file.rb @@ -1,4 +1,4 @@ -# typed: true +# typed: strict # frozen_string_literal: true require "dependabot/config/update_config" @@ -10,11 +10,22 @@ module Config class File extend T::Sig - attr_reader :updates, :registries + sig { returns(T::Array[T::Hash[Symbol, String]]) } + attr_reader :updates + sig { returns T::Array[T.untyped] } + attr_reader :registries + + sig do + params( + updates: T.nilable(T::Array[T::Hash[Symbol, String]]), + registries: T.nilable(T::Array[T.untyped]) + ) + .void + end def initialize(updates:, registries: nil) - @updates = updates || [] - @registries = registries || [] + @updates = T.let(updates || [], T::Array[T::Hash[Symbol, String]]) + @registries = T.let(registries || [], T::Array[T.untyped]) end sig do