From d0b2e705c49709cfb92a9110c65cd628c91aaa29 Mon Sep 17 00:00:00 2001 From: Francesco Trotta Date: Thu, 7 Nov 2024 11:11:58 +0100 Subject: [PATCH] fix: non-optional properties in generic interfaces (#132) --- packages/core/src/types.ts | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/packages/core/src/types.ts b/packages/core/src/types.ts index 9d2447c..16d77b4 100644 --- a/packages/core/src/types.ts +++ b/packages/core/src/types.ts @@ -186,10 +186,10 @@ export interface RulesMeta< * Generic type for `RuleContext`. */ export interface RuleContextTypeOptions { - LangOptions?: LanguageOptions; - Code?: SourceCode; - RuleOptions?: unknown[]; - Node?: unknown; + LangOptions: LanguageOptions; + Code: SourceCode; + RuleOptions: unknown[]; + Node: unknown; } /** @@ -441,13 +441,13 @@ export type SuggestedEdit = SuggestedEditBase & SuggestionMessage; * Generic options for the `RuleDefinition` type. */ export interface RuleDefinitionTypeOptions { - LangOptions?: LanguageOptions; - Code?: SourceCode; - RuleOptions?: unknown[]; - Visitor?: RuleVisitor; - Node?: unknown; - MessageIds?: string; - ExtRuleDocs?: unknown; + LangOptions: LanguageOptions; + Code: SourceCode; + RuleOptions: unknown[]; + Visitor: RuleVisitor; + Node: unknown; + MessageIds: string; + ExtRuleDocs: unknown; } /** @@ -535,9 +535,9 @@ export type RulesConfig = Record; * Generic options for the `Language` type. */ export interface LanguageTypeOptions { - LangOptions?: LanguageOptions; - Code?: SourceCode; - RootNode?: unknown; + LangOptions: LanguageOptions; + Code: SourceCode; + RootNode: unknown; Node: unknown; } @@ -733,10 +733,10 @@ interface InlineConfigElement { * Generic options for the `SourceCodeBase` type. */ interface SourceCodeBaseTypeOptions { - LangOptions?: LanguageOptions; - RootNode?: unknown; - SyntaxElementWithLoc?: unknown; - ConfigNode?: unknown; + LangOptions: LanguageOptions; + RootNode: unknown; + SyntaxElementWithLoc: unknown; + ConfigNode: unknown; } /**