1.8.0
Highlights
- New RubyLSP indexing enhancement allows RubyLSP to auto-complete instance variables based on property definitions.
Literal::Data
andLiteral::Struct
now supportto_hash
- Improved generation of predicate names from
Literal::Enum
member constant names - The default proc on properties is now evaluated in the context of the new instance being initialised
- The
_JSONData
type now takes parameters to limit the type, e.g._JSONData(Array)
_Not
can now take multiple parameters and then wraps a union of those parameters, e.g._Not(_Union(*your_types))
- A new type
_Pattern
takes a regular expression and a block which is yielded the capture params as positional arguments and the named captures as keyword arguments. The type matches if the regular expression matches and the block returns truthy. - A new type
_Unit(T)
matches if the value is exactly the same object as theT
parameter. - Minor performance improvements
PRs
- feat: Better predicates support for SCREAMING_ENUM by @ixti in #317
- Allow defaults to reference methods inside class by @rickychilcott in #320
- fix: Align defaults with generated code by @ixti in #319
- feat: Make data structs implicitly Hash coercible by @ixti in #318
- Implements
#reverse
in Literal::Array by @hslzr in #297 - Implements
#reverse!
in Literal::Array by @hslzr in #298 - Ruby LSP extension by @joeldrapper in #323
New Contributors
- @rickychilcott made their first contribution in #320
Full Changelog: 1.7.1...1.8.0