Sha256: 876bfd14561603a75c7983ec7c1419fd3e53bcc134ebbccf30a81841f011d456

Contents?: true

Size: 1018 Bytes

Versions: 2

Compression:

Stored size: 1018 Bytes

Contents

# typed: strict
# frozen_string_literal: true

require "sorbet-runtime"
require "sorbet-result"
require "sorbet-struct-comparable"

# We can't use `Loader.for_gem` here as we've unconventionally named the root file.
require "zeitwerk"
loader = Zeitwerk::Loader.new
loader.push_dir(__dir__.to_s)
loader.ignore(__FILE__)
loader.ignore("#{__dir__}/sorbet-schema/**/*.rb")
loader.inflector.inflect(
  "json_serializer" => "JSONSerializer"
)
loader.setup

# We don't want to place this in the `Typed` module.
# `sorbet-schema` is a directory that is not autoloaded
# but contains extensions, so we need to manually require it.
require_relative "sorbet-schema/hash_transformer"

# We want to add a default `schema` method to structs
# that will guarentee a schema can be created for use
# with serialization. This can (and should) be overridden
# in child struct classes.
require_relative "sorbet-schema/t/struct"

# Sorbet-aware namespace to super-charge your projects
module Typed
  Value = T.type_alias { T.untyped }
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sorbet-schema-0.6.0 lib/sorbet-schema.rb
sorbet-schema-0.5.1 lib/sorbet-schema.rb