This PR fixes the type integration tests in ESLint which would currently fail with @eslint/core@0.8.0 (eslint/eslint#19098).
The fix consists in marking the properties of generic interfaces as non-optional, meaning that they can't be undefined. These properties are only used to refer to a type. For example there is no actual object with a property MessageIds, but RuleDefinitionTypeOptions["MessageIds"] is used as an alias for string. If a union with undefined is desired, it can always be indicated explicitly as RuleDefinitionTypeOptions["MessageIds"] | undefined.
Related Issues
refs eslint/eslint#19098
Is there anything you'd like reviewers to focus on?
Prerequisites checklist
What is the purpose of this pull request?
Fix a bug in the types.
What changes did you make? (Give an overview)
This PR fixes the type integration tests in ESLint which would currently fail with
@eslint/core@0.8.0
(eslint/eslint#19098).The fix consists in marking the properties of generic interfaces as non-optional, meaning that they can't be
undefined
. These properties are only used to refer to a type. For example there is no actual object with a propertyMessageIds
, butRuleDefinitionTypeOptions["MessageIds"]
is used as an alias forstring
. If a union withundefined
is desired, it can always be indicated explicitly asRuleDefinitionTypeOptions["MessageIds"] | undefined
.Related Issues
refs eslint/eslint#19098
Is there anything you'd like reviewers to focus on?