Skip to content

Commit e1d9b3d

Browse files
committed
fix: restore parseSource as async to avoid await-thenable lint errors
1 parent fa7b7f3 commit e1d9b3d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/trace/parser.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,11 @@ function loadGrammar(language: string): Parser.Language | null {
6969
}
7070

7171
/** Parse source code and return the tree. Returns null if grammar unavailable. */
72-
export function parseSource(
72+
// eslint-disable-next-line @typescript-eslint/require-await
73+
export async function parseSource(
7374
source: string,
7475
language: string,
75-
): Parser.Tree | null {
76+
): Promise<Parser.Tree | null> {
7677
if (!TreeSitter && !isTreeSitterAvailable()) return null;
7778

7879
const grammar = loadGrammar(language);

0 commit comments

Comments
 (0)