{"id":25114,"library":"concordialang-types","title":"ConcordiaLang Types","description":"Provides basic TypeScript types for the Concordia Compiler and its plug-ins, including AST, test script, and plugin interfaces. Current stable version is 2.1.6, released with browser support via microbundle. Key differentiators: lightweight, typed, and designed for the Concordia ecosystem. Breaking changes in v2 removed most types, keeping only Location and AbstractDatabase. Release cadence is sporadic, with recent updates focusing on compatibility.","status":"active","version":"2.1.6","language":"javascript","source_language":"en","source_url":"https://github.com/thiagodp/concordialang-types","tags":["javascript","concordialang","concordia-lang","concordia","type","ast","test","script","test-script","typescript"],"install":[{"cmd":"npm install concordialang-types","lang":"bash","label":"npm"},{"cmd":"yarn add concordialang-types","lang":"bash","label":"yarn"},{"cmd":"pnpm add concordialang-types","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM-only; no CommonJS exports.","wrong":"const Location = require('concordialang-types').Location","symbol":"Location","correct":"import { Location } from 'concordialang-types'"},{"note":"Default export from package root; avoid deep imports.","wrong":"import { AbstractDatabase } from 'concordialang-types/src/AbstractDatabase'","symbol":"AbstractDatabase","correct":"import { AbstractDatabase } from 'concordialang-types'"},{"note":"Named export, not default. Added in v2.1.4.","wrong":"import TestScriptExecutionResult from 'concordialang-types'","symbol":"TestScriptExecutionResult","correct":"import { TestScriptExecutionResult } from 'concordialang-types'"}],"quickstart":{"code":"import { Location, AbstractDatabase } from 'concordialang-types';\n\nconst loc: Location = { path: '/test', line: 10, column: 5 };\nconsole.log(loc);\n\nclass MyDatabase implements AbstractDatabase {\n  connect(): Promise<void> { return Promise.resolve(); }\n  disconnect(): Promise<void> { return Promise.resolve(); }\n  query(sql: string): Promise<any[]> { return Promise.resolve([]); }\n}\n\nconst db = new MyDatabase();\ndb.connect().then(() => console.log('Connected'));","lang":"typescript","description":"Shows usage of Location and AbstractDatabase types with a custom database implementation."},"warnings":[{"fix":"Use v1.x for other types, or update code to rely only on Location and AbstractDatabase.","message":"v2.0.0 removed most types, only Location and AbstractDatabase remain.","severity":"breaking","affected_versions":">=2.0.0 <2.0.0"},{"fix":"Update all references from 'shoudFail' to 'shouldFail'.","message":"v1.0.0 renamed property 'shoudFail' to 'shouldFail' in TestCase.","severity":"breaking","affected_versions":">=1.0.0 <1.0.0"},{"fix":"Migrate to v1.x or v2.x; check CHANGELOG for specifics.","message":"v0.x types are incompatible with v1+ and v2+; no longer supported.","severity":"deprecated","affected_versions":">=0.0.0 <1.0.0"},{"fix":"Use ESM imports; if using CommonJS, consider dynamic import() or transpilation.","message":"Package uses microbundle; builds are ESM-only. No CommonJS support.","severity":"gotcha","affected_versions":">=2.1.4"},{"fix":"Ensure bundler (webpack/rollup) is configured for ESM or switch to Node.js.","message":"No browser CJS bundle; browser consumers must use bundler with ESM.","severity":"gotcha","affected_versions":">=2.1.4"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'npm install concordialang-types' and ensure tsconfig 'node_modules' resolution works.","cause":"Package not installed or missing @types/concordialang-types (unnecessary as types are bundled).","error":"Cannot find module 'concordialang-types' or its corresponding type declarations."},{"fix":"Create a class that implements AbstractDatabase instead of instantiating it directly.","cause":"Trying to instantiate AbstractDatabase directly (it's an interface, not a class).","error":"TypeError: concordialang_types_1.AbstractDatabase is not a constructor"},{"fix":"Check package version. If using v2+, only Location, AbstractDatabase, and TestScriptExecutionResult are available. Use v1.x for removed types.","cause":"Importing a member that was removed in v2.0.0 (e.g., TestCase, UIProperty).","error":"Module '\"concordialang-types\"' has no exported member 'X'. Did you mean to use 'import X from \"concordialang-types\"'?"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}