refactor: Fix types

This commit is contained in:
Sidharth Vinod
2023-11-15 09:25:49 +05:30
parent f15d24b4e8
commit 0d7644c782
7 changed files with 32 additions and 21 deletions

View File

@@ -1,3 +1,12 @@
import type { AstNode } from 'langium';
export type { Info, Packet } from './language/index.js';
export { MermaidParseError, parse } from './parse.js';
export type { DiagramAST } from './parse.js';
export { parse, MermaidParseError } from './parse.js';
/**
* Exclude/omit all `AstNode` attributes recursively.
*/
export type RecursiveAstOmit<T> = T extends object
? { [P in keyof T as Exclude<P, keyof AstNode>]: RecursiveAstOmit<T[P]> }
: T;