Skip to content

Commit d0b2e70

Browse files
authored
fix: non-optional properties in generic interfaces (#132)
1 parent 3a87bbb commit d0b2e70

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

packages/core/src/types.ts

+18-18
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,10 @@ export interface RulesMeta<
186186
* Generic type for `RuleContext`.
187187
*/
188188
export interface RuleContextTypeOptions {
189-
LangOptions?: LanguageOptions;
190-
Code?: SourceCode;
191-
RuleOptions?: unknown[];
192-
Node?: unknown;
189+
LangOptions: LanguageOptions;
190+
Code: SourceCode;
191+
RuleOptions: unknown[];
192+
Node: unknown;
193193
}
194194

195195
/**
@@ -441,13 +441,13 @@ export type SuggestedEdit = SuggestedEditBase & SuggestionMessage;
441441
* Generic options for the `RuleDefinition` type.
442442
*/
443443
export interface RuleDefinitionTypeOptions {
444-
LangOptions?: LanguageOptions;
445-
Code?: SourceCode;
446-
RuleOptions?: unknown[];
447-
Visitor?: RuleVisitor;
448-
Node?: unknown;
449-
MessageIds?: string;
450-
ExtRuleDocs?: unknown;
444+
LangOptions: LanguageOptions;
445+
Code: SourceCode;
446+
RuleOptions: unknown[];
447+
Visitor: RuleVisitor;
448+
Node: unknown;
449+
MessageIds: string;
450+
ExtRuleDocs: unknown;
451451
}
452452

453453
/**
@@ -535,9 +535,9 @@ export type RulesConfig = Record<string, RuleConfig>;
535535
* Generic options for the `Language` type.
536536
*/
537537
export interface LanguageTypeOptions {
538-
LangOptions?: LanguageOptions;
539-
Code?: SourceCode;
540-
RootNode?: unknown;
538+
LangOptions: LanguageOptions;
539+
Code: SourceCode;
540+
RootNode: unknown;
541541
Node: unknown;
542542
}
543543

@@ -733,10 +733,10 @@ interface InlineConfigElement {
733733
* Generic options for the `SourceCodeBase` type.
734734
*/
735735
interface SourceCodeBaseTypeOptions {
736-
LangOptions?: LanguageOptions;
737-
RootNode?: unknown;
738-
SyntaxElementWithLoc?: unknown;
739-
ConfigNode?: unknown;
736+
LangOptions: LanguageOptions;
737+
RootNode: unknown;
738+
SyntaxElementWithLoc: unknown;
739+
ConfigNode: unknown;
740740
}
741741

742742
/**

0 commit comments

Comments
 (0)