Files
yellowjacket/frontend/tsconfig.json
T
yonluandClaude Opus 5 162c68769f feat(wails): move the frontend onto v3's generated bindings
frontend/wailsjs/ is deleted and frontend/bindings/ takes its place —
a real TypeScript module tree nested by Go import path, generated by
wails3's static analyser rather than by building the app and running
it.  The @go alias absorbs the constant prefix, so a call site imports
'@go/library/library.js' and the codemod over all 93 sites was a
specifier rewrite plus splitting @go/models' namespaces into one
import per package.

The 12 SetContext bindings and the fake `context` model are gone, as
Phase 2's ServiceStartup port promised: 272 methods across 12
services, none of them plumbing.

@runtime/runtime is now a local shim (src/wails/runtime.ts) over
@wailsio/runtime, so the 22 EventsOn imports are untouched.  It
unwraps v3's WailsEvent into v2's callback shape, which is exact here:
nothing in backend/events passes more than one data argument, and v3
only packs arguments into a slice when there is more than one.

v3 tells the truth about two things v2 lied about, and that is most of
the diff.  A Go nil slice really does arrive as JSON null, and a Go
named string type really is an enum; v2 typed them as T[] and string.
utils/binding.ts states the app's actual contract — an absent list is
an empty list — once, at the boundary where it is true, and also drops
the CancellablePromise the app never cancels.  Four test fixtures
widen an enum field back to its value union.

Not done, and Phase 5's to fix: frontend/test/support/wails-fake.ts
still fakes window.go, which v3 does not have, so `make ui-test` is
broken and harness.test.ts fails to compile on EventsEmit.  That test
also asserts v2 ordering that no longer holds — v3's Events.Emit calls
the backend and does not notify in-page listeners at all.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UDCbcCZQepnpSQYJ6SxxZm
2026-08-14 17:48:38 -04:00

49 lines
2.4 KiB
JSON

{
"compilerOptions": {
// base options
"esModuleInterop": true, // Helps mend a few of the fences between CommonJS and ES Modules.
"skipLibCheck": true, // Skips checking the types of .d.ts files. This is important for performance, because otherwise all node_modules will be checked.
"target": "esnext", // The version of JavaScript you're targeting.
"allowJs": true, // Allows you to import .js files.
"moduleDetection": "force", // This option forces TypeScript to consider all files as modules. This helps to avoid 'cannot redeclare block-scoped variable' errors.
"isolatedModules": true, // This option prevents a few TS features which are unsafe when treating modules as isolated files.
"verbatimModuleSyntax": true, // This option forces you to use import type and export type, leading to more predictable behavior and fewer unnecessary imports.
// strictness
"strict": true, // Enables all strict type checking options.
"noUncheckedIndexedAccess": true, // Prevents you from accessing an array or object without first checking if it's defined.
"noImplicitOverride": true, // Makes the override keyword actually useful in classes.
// optional "noisy" options
"noImplicitReturns": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
// transpiling to js options
"module": "esnext", // Tells TypeScript what module syntax to use.
"outDir": "dist", // Tells TypeScript where to put the compiled JavaScript files.
// running in the DOM
"lib": ["esnext", "dom", "dom.iterable"], // Tells TypeScript what built-in types to include.
// module resolution
"moduleResolution": "bundler",
"paths": { // path aliases to find modules
"@go/*": ["./bindings/yellowjacket/backend/*"],
"@components/*": ["./src/components/*"],
"@assets/*": ["./src/assets/*"],
"@pages/*": ["./src/pages/*"],
"@runtime/*": ["./src/wails/*"],
"@utils/*": ["./src/utils/*"],
"@store/*": ["./src/store/*"],
"@test/*": ["./test/*"]
},
"types": ["vite/client", "@vitest/browser-playwright"],
// needed for Lit Elements
"experimentalDecorators": true,
"useDefineForClassFields": false, // allows us to define properties as class fields
// plugins
"plugins": [
{"name": "ts-lit-plugin"},
{"name": "typescript-lit-html-plugin"}
]
},
"include": ["src", "bindings", "test"]
}