League-of-Foundry-Developers / foundry-vtt-types

Unofficial type declarations for the Foundry Virtual Tabletop API
MIT License
111 stars 52 forks source link

DataModelValidationFailure Constructor #2644

Closed NekroDarkmoon closed 1 month ago

NekroDarkmoon commented 1 month ago

Foundry VTT Version

v12 / v11

Description

DataModelValidationFailure should have an optional argument for its constructor but has a required constructor in the types

Reproduction Steps

const failures = new DataModelValidationFailure();

Expected Behavior

The above errors because it expects a param to be passed to DataModelValidationFailure.

Additional Context

No response

JPMeehan commented 1 month ago

Pretty sure this is just a missing ? in the constructor. Should definitely write tests for this.