MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / parseOk

Function parseOk

packages/vite/hmr/server/websocket-integrity.spec.ts:5–12  ·  view source on GitHub ↗
(code: string)

Source from the content-addressed store, hash-verified

3import { ensureNativeScriptModuleBindings } from './websocket.js';
4
5function parseOk(code: string): { ok: boolean; error?: any } {
6 try {
7 babelParse(code, { sourceType: 'module', plugins: ['jsx', 'importMeta', 'topLevelAwait', 'logicalAssignment', 'optionalChaining', 'nullishCoalescingOperator', 'optionalCatchBinding'] as any });
8 return { ok: true };
9 } catch (e) {
10 return { ok: false, error: e };
11 }
12}
13
14describe('vendor-binding syntax integrity', () => {
15 it('produces valid JS for multiple plugin import shapes (app-like)', () => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected