# typed: strict module DataModel module Fixtures::Array extend self extend T::Sig include Fixtures sig { returns(Example) } def string_array Example.new( [:array, :string], variants: { strings: ["a", "b", "c"], string: ["a", ["a"]], number: [1, ["1"]], missing: nil, numbers: [[1, 2, 3], ["1", "2", "3"]], other_type: Object.new }, ) end sig { returns(Example) } def wrapping_string_array Example.new( [:array, { wrap_single_value: true }, :string], variants: { strings: ["a", "b", "c"], string: ["a", ["a"]], number: [1, ["1"]], missing: nil, numbers: [[1, 2, 3], ["1", "2", "3"]], other_type: Object.new }, ) end sig { returns(Example) } def optional_string_array Example.new( [:array, { optional: true }, :string], variants: { strings: ["a", "b", "c"], missing: nil }, ) end sig { returns(Example) } def array_optional_string Example.new( [:array, [:string, { optional: true }]], variants: { optional_strings: ["a", nil, "c"], numbers: [1, nil, 3] }, ) end end end