{"id":27474,"library":"ts2c-target-gdbk-n","title":"TS2C ESP-GDBK-N Target","description":"A target package for the TS2C transpiler (v0.15.0+, monthly releases) that compiles TypeScript to C for the ESP-GDBK-N microcontroller. Provides board-specific hardware abstractions (GPIO, SPI, I2C) as TypeScript decorators. Differentiates from Arduino by allowing TypeScript-to-C transpilation, enabling type-safe embedded development. No readme available; usage inferred from peer package 'ts2c'.","status":"active","version":"0.0.1","language":"javascript","source_language":"en","source_url":"git://github.com/andrei-markeev/ts2c-target-gdbk-n","tags":["javascript","typescript"],"install":[{"cmd":"npm install ts2c-target-gdbk-n","lang":"bash","label":"npm"},{"cmd":"yarn add ts2c-target-gdbk-n","lang":"bash","label":"yarn"},{"cmd":"pnpm add ts2c-target-gdbk-n","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core transpiler required for compilation to C","package":"ts2c","optional":false}],"imports":[{"note":"Named export only; no default export.","wrong":"import GPIO from 'ts2c-target-gdbk-n'","symbol":"GPIO","correct":"import { GPIO } from 'ts2c-target-gdbk-n'"},{"note":"ESM-only; CommonJS require() fails with named exports.","wrong":"const SPI = require('ts2c-target-gdbk-n').SPI","symbol":"SPI","correct":"import { SPI } from 'ts2c-target-gdbk-n'"},{"note":"ESM-only; require() may work in Node but not in browsers or the transpiler context.","wrong":"const { I2C } = require('ts2c-target-gdbk-n')","symbol":"I2C","correct":"import { I2C } from 'ts2c-target-gdbk-n'"}],"quickstart":{"code":"// ts2c-target-gdbk-n quickstart: blink LED on GPIO 2\nimport { GPIO } from 'ts2c-target-gdbk-n';\n\n@GPIO({ pin: 2, mode: 'output' })\nclass Led {\n  on() { /* compiler inserts C code */ }\n  off() { /* compiler inserts C code */ }\n}\n\nconst led = new Led();\nled.on();\nsetTimeout(() => led.off(), 1000);\n","lang":"typescript","description":"Demonstrates basic GPIO output usage with the Led class decorator."},"warnings":[{"fix":"Update ts2c to >=0.15.0.","message":"Requires ts2c >= 0.15.0; older versions not compatible.","severity":"breaking","affected_versions":"<0.0.1"},{"fix":"Refer to ts2c documentation for general usage patterns.","message":"No readme or documentation available; API surface may change without notice.","severity":"gotcha","affected_versions":"=0.0.1"},{"fix":"Use { GPIO, SPI, I2C } import syntax.","message":"All exports are named; no default export exists.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Use import statements with the transpiler which expects ESM.","message":"Package is ESM-only; CommonJS require() may fail in some environments.","severity":"gotcha","affected_versions":">=0.0.1"}],"env_vars":null,"search_vec":"'abstract':34 'allow':45 'arduino':43 'avail':59 'board':31 'board-specif':30 'c':21,49 'compil':18 'decor':40 'develop':56 'differenti':41 'embed':55 'enabl':51 'esp':3,25 'esp-gdbk-n':2,24 'gdbk':4,26 'gpio':35 'hardwar':33 'i2c':37 'infer':61 'javascript':66 'microcontrol':28 'month':15 'n':5,27 'packag':9,64 'peer':63 'provid':29 'readm':58 'releas':16 'safe':54 'specif':32 'spi':36 'target':6,8 'transpil':13,50 'ts2c':1,12,65 'type':53 'type-saf':52 'typescript':19,39,47,67 'typescript-to-c':46 'usag':60 'v0.15.0':14","created_at":"2026-05-01T17:46:26.975275+00:00","updated_at":"2026-05-01T17:46:26.975275+00:00","problems":[{"fix":"npm install ts2c-target-gdbk-n --save-dev","cause":"Package not installed or missing from tsconfig includes.","error":"Cannot find module 'ts2c-target-gdbk-n' or its corresponding type declarations."},{"fix":"Switch to import statement in an ESM context.","cause":"Using require() on ESM-only package.","error":"SyntaxError: Unexpected token 'export'"},{"fix":"Use import { GPIO } from 'ts2c-target-gdbk-n'","cause":"Using default import instead of named import.","error":"TypeError: GPIO is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/andrei-markeev/ts2c-target-gdbk-n","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/ts2c-target-gdbk-n","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-05-01","next_check":"2026-07-30","install_tag":null}}