High TypeScript checking cost from generated Zod 3 schemas
Los mantenedores suelen responder en 1 día
@lforst ya está trabajando en esto.
Desde el 15/10/2026.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 22/100
- Tipo de issue
- Refactorización
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- nodejs, typescript
- Área
- performance
Línea de trabajo
Start with the reproduction: a one-line import of LazyValue and TestBackgroundLogger from braintrust, checked with yarn exec tsc --extendedDiagnostics under the given tsconfig, compared against an export {} baseline. The generated schemas live in js/src/generated_types.ts, which imports zod/v3. Done means a measured drop in type and instantiation counts while the public input and output types stay the same. The issue asks for that benchmark before any migration.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Braintrust 3.37.2 adds substantial declaration-checking work from a single unused import.
Reproduction
Use Node.js 24.21.0 and an ESM project ("type": "module" in package.json). With Yarn, set nodeLinker: node-modules in .yarnrc.yml.
yarn add [email protected] [email protected]
yarn add -D [email protected] @types/[email protected] [email protected]
repro.ts:
import { LazyValue, TestBackgroundLogger } from "braintrust";
tsconfig.json:
{
"compilerOptions": {
"strict": true,
"target": "ES2023",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"types": ["node"],
"skipLibCheck": false,
"noEmit": true
},
"files": ["repro.ts"]
}
Run yarn exec tsc --extendedDiagnostics. For the baseline, replace the import with export {};.
Results
All checks pass. Measured deterministic counts on TS7:
| Case | Types | Instantiations |
|---|---|---|
| No Braintrust import | 64,716 | 62,345 |
| With Braintrust import | 624,895 | 1,791,353 |
No SDK calls or credentials are required. The root and braintrust/node imports load the same declarations.
Possible fix
Generated schemas import zod/v3. Zod 4 redesigned its generics to reduce compiler instantiations.
Could these schemas migrate to Zod 4 and the public declarations be regenerated? That seems like the first approach to benchmark, while preserving precise public input and output types. We have not measured an actual schema migration yet.
- Lenguaje dominante
- TypeScript
- Estrellas
- 29
- Forks
- 16
- Merge medio
- 1 d 20 h
- PR fusionados (30 d)
- 70
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de braintrustdata/braintrust-sdk-javascript
-
typescript
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
braintrustdata/braintrust-sdk-javascript#2578 ·
Los mantenedores suelen responder en 1 día
-
[bot] Instrument Letta Agent SDK (87,205 weekly downloads)Posiblemente ocupada @karthiksenv la tomó hace 3 días. Abiertotypescript
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
braintrustdata/braintrust-sdk-javascript#2577 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
braintrustdata/braintrust-sdk-javascript#2527 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 65/100
braintrustdata/braintrust-sdk-javascript#2526 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 56/100
braintrustdata/braintrust-sdk-javascript#2482 ·
Los mantenedores suelen responder en 1 día
Todos los issues de braintrustdata/braintrust-sdk-javascript
Issues similares
-
documentation good first issue
Dificultad 2/5 Medio día Aptitud para principiantes 72/100
sujithputta02/Esapay#13 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
ehmpathy/rhachet-roles-bhuild#468 ·
Los mantenedores suelen responder en 1 día
-
Share dialog: the address book's contact count reads "1 contacts" (no singular form in any language)Posiblemente ocupada @chibenwa la tomó hoy. Abiertoai-driven-qa bug claude Cosmetic
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
linagora/twake-contacts-frontend#271 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
factory-active task-identify-harness-labels-done task-identify-issue-type-done
Dificultad 1/5 Menos de una hora Aptitud para principiantes 70/100
vercel/ai#23435 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Koenkk/zigbee2mqtt#33402 ·
Los mantenedores suelen responder en 1 día