Skip to content

effect@3.14.6

Choose a tag to compare

@github-actions github-actions released this 04 Apr 15:58
· 906 commits to main since this release
4a687e8

Patch Changes

  • #4674 47618c1 Thanks @suddenlyGiovanni! - Improved TsDoc documentation for MutableHashSet module.

  • #4699 6077882 Thanks @gcanti! - Fix JSONSchema generation for record values that include undefined, closes #4697.

    Before

    import { JSONSchema, Schema } from "effect"
    
    const schema = Schema.partial(
      Schema.Struct(
        { foo: Schema.Number },
        {
          key: Schema.String,
          value: Schema.Number
        }
      )
    )
    
    console.log(JSON.stringify(JSONSchema.make(schema), null, 2))
    // throws

    After

    import { JSONSchema, Schema } from "effect"
    
    const schema = Schema.partial(
      Schema.Struct(
        { foo: Schema.Number },
        {
          key: Schema.String,
          value: Schema.Number
        }
      )
    )
    
    console.log(JSON.stringify(JSONSchema.make(schema), null, 2))
    /*
    Output:
    {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "required": [],
      "properties": {
        "foo": {
          "type": "number"
        }
      },
      "additionalProperties": {
        "type": "number"
      }
    }
    */