Skip to content

Commit

Permalink
fix: non-optional properties in generic interfaces (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
fasttime authored Nov 7, 2024
1 parent 3a87bbb commit d0b2e70
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions packages/core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down Expand Up @@ -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;
}

/**
Expand Down Expand Up @@ -535,9 +535,9 @@ export type RulesConfig = Record<string, RuleConfig>;
* Generic options for the `Language` type.
*/
export interface LanguageTypeOptions {
LangOptions?: LanguageOptions;
Code?: SourceCode;
RootNode?: unknown;
LangOptions: LanguageOptions;
Code: SourceCode;
RootNode: unknown;
Node: unknown;
}

Expand Down Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit d0b2e70

Please sign in to comment.