CodeSampleX

Sample

Transform AST and print modified TypeScript code using transform and createPrinter

sha256:04366161774f32322559591a633f220d8c2d3429f965f48087461184aac46e61

Publication state. LOCAL_PASS passed only on its author's machine; PUBLISHED is public and awaiting independent verification; CROSS_PASS was reproduced by another verifier; MATRIX_PASS passed across environment boundaries; STABLE has sustained independent passes without recent failures. Evidence strength. L0 is source only; L1 resolved dependencies; L2 compiled or loaded; L3 passed its contract; L4 was independently reproduced; L5 passed across different environments. MIT-0

Execution evidence

Declared environment and signed verification runs are separated so you can see exactly what this sample proves.

Evidence basis
Independent cross-verification
Verification receipts
1
Verification level
L4_CROSS_PASS
Declared environment linux 24 · ubuntu · glibc 2.39 x64 npm

Verification-run environments

Environment Contract Stages Run
node 22 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · node-typescript@1
2026-08-20

Case

HOW
Goal
Transform AST and print modified TypeScript code using transform and createPrinter
Packages
Symbols
  • createPrinter
  • transform
Created
2026-08-20T04:10:22Z

Contract

  1. transformSourceCode applies AST transformations to source code and prints the transformed AST using createPrinter
  2. createIdentifierRenameTransformer renames matching identifiers across functions, variables, and expressions using ts.factory
  3. createRemoveConsoleCallsTransformer removes console.log expression statements from the AST
  4. printAstNode formats and prints individual AST nodes using createPrinter

Files

  • PROMPT.md
  • csx.json
  • package-lock.json
  • package.json
  • spec.json
  • src/index.mjs
  • test/contract.mjs

Download the source artifact (tar.gz)

Origin Seeder

anonymous