Skip to content

Commit cb24788

Browse files
committed
chore: wip
1 parent b92aa21 commit cb24788

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

storage/framework/core/actions/src/helpers/vscode-custom-data.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
import { type Err, type Ok, type Result, err, ok } from '@stacksjs/error-handling'
1+
import { err, ok } from '@stacksjs/error-handling'
2+
import type { Err, Ok, Result } from '@stacksjs/error-handling'
23
import { log } from '@stacksjs/logging'
34
import { customElementsDataPath } from '@stacksjs/path'
45
import { writeTextFile } from '@stacksjs/storage'
56
import library from '~/config/library'
67

7-
export async function generateVsCodeCustomData(): Promise<Result<Ok<void>, Err<Error>>> {
8+
export async function generateVsCodeCustomData(): Promise<Result<void, string>> {
89
try {
910
log.info('Generating custom-elements.json...')
1011
// the version does not have to be set here,
@@ -16,10 +17,10 @@ export async function generateVsCodeCustomData(): Promise<Result<Ok<void>, Err<E
1617

1718
log.success('Generated custom-elements.json for IDEs.')
1819

19-
return ok(void 0)
20-
} catch (err: unknown) {
21-
log.error('There was an error generating the custom-elements.json file.', err)
22-
return err(err instanceof Error ? err : new Error(String(err)))
20+
return ok(undefined)
21+
} catch (e) {
22+
log.error('There was an error generating the custom-elements.json file.', e)
23+
return err('There was an error generating the custom-elements.json file.')
2324
}
2425
}
2526

0 commit comments

Comments
 (0)