MCPcopy Index your code
hub / github.com/srcbookdev/srcbook / getValidationError

Function getValidationError

packages/web/src/components/use-tsconfig-json.tsx:5–13  ·  view source on GitHub ↗
(source: string)

Source from the content-addressed store, hash-verified

3import { SessionChannel } from '@/clients/websocket';
4
5function getValidationError(source: string) {
6 try {
7 JSON.parse(source);
8 return null;
9 } catch (e) {
10 const err = e as Error;
11 return err.message;
12 }
13}
14
15export interface TsConfigContextValue {
16 source: string;

Callers 1

TsConfigProviderFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected