Skip to content

Commit 0732e2d

Browse files
return type for parseAst
1 parent 840d280 commit 0732e2d

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

packages/router-utils/src/ast.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@ export type ParseAstOptions = ParserOptions & {
88
code: string
99
}
1010

11-
export function parseAst({
12-
code,
13-
...opts
14-
}: ParseAstOptions): ParseResult<_babel_types.File> {
11+
export type ParseAstResult = ParseResult<_babel_types.File>
12+
export function parseAst({ code, ...opts }: ParseAstOptions): ParseAstResult {
1513
return parse(code, {
1614
plugins: ['jsx', 'typescript', 'explicitResourceManagement'],
1715
sourceType: 'module',

packages/router-utils/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export { parseAst, generateFromAst } from './ast'
2-
export type { ParseAstOptions, GeneratorResult } from './ast'
2+
export type { ParseAstOptions, ParseAstResult, GeneratorResult } from './ast'
33
export { logDiff } from './logger'
44

55
export { copyFilesPlugin } from './copy-files-plugin'

0 commit comments

Comments
 (0)