Skip to content

Commit

Permalink
Make two types compatible compatible with strict tsc config
Browse files Browse the repository at this point in the history
  • Loading branch information
kachkaev authored Sep 18, 2024
1 parent 2ca029e commit 86c249d
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions packages/utils/src/getDirectiveExtensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,17 @@ import { valueFromAST, valueFromASTUntyped } from 'graphql';
import { getArgumentValues } from './getArgumentValues.js';
import { memoize1 } from './memoize.js';

export type DirectableASTNode = ASTNode & { directives?: readonly DirectiveNode[] };
export type DirectableASTNode = ASTNode & {
directives?: readonly DirectiveNode[] | undefined;
};

export type DirectableObject = {
astNode?: DirectableASTNode | null;
extensionASTNodes?: readonly DirectableASTNode[] | null;
extensions?: { directives?: Record<string, any> } | null;
astNode?: DirectableASTNode | null | undefined;
extensionASTNodes?: readonly DirectableASTNode[] | null | undefined;
extensions?:
| { directives?: Record<string, any> | undefined }
| null
| undefined;
};

export function getDirectiveExtensions<
Expand Down

0 comments on commit 86c249d

Please sign in to comment.