Registry / type-stubs / concordialang-types

concordialang-types

JSON →
library2.1.6jsnpmunverified

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.

npm install concordialang-types
INSTALL
IMPORT
SIG · CONCORDIALANG-TYPE
C
concordialang-types
type-stubsjavascriptv2.1.6
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Location
import { Location } from 'concordialang-types'
const Location = require('concordialang-types').Location
ESM-only; no CommonJS exports.
AbstractDatabase
import { AbstractDatabase } from 'concordialang-types'
import { AbstractDatabase } from 'concordialang-types/src/AbstractDatabase'
Default export from package root; avoid deep imports.
TestScriptExecutionResult
import { TestScriptExecutionResult } from 'concordialang-types'
import TestScriptExecutionResult from 'concordialang-types'
Named export, not default. Added in v2.1.4.

Shows usage of Location and AbstractDatabase types with a custom database implementation.

import { Location, AbstractDatabase } from 'concordialang-types'; const loc: Location = { path: '/test', line: 10, column: 5 }; console.log(loc); class MyDatabase implements AbstractDatabase { connect(): Promise<void> { return Promise.resolve(); } disconnect(): Promise<void> { return Promise.resolve(); } query(sql: string): Promise<any[]> { return Promise.resolve([]); } } const db = new MyDatabase(); db.connect().then(() => console.log('Connected'));
Debug
Known issues
breakingv2.0.0 removed most types, only Location and AbstractDatabase remain.
fix
Use v1.x for other types, or update code to rely only on Location and AbstractDatabase.
affects: >=2.0.0 <2.0.0
breakingv1.0.0 renamed property 'shoudFail' to 'shouldFail' in TestCase.
fix
Update all references from 'shoudFail' to 'shouldFail'.
affects: >=1.0.0 <1.0.0
deprecatedv0.x types are incompatible with v1+ and v2+; no longer supported.
fix
Migrate to v1.x or v2.x; check CHANGELOG for specifics.
affects: >=0.0.0 <1.0.0
gotchaPackage uses microbundle; builds are ESM-only. No CommonJS support.
fix
Use ESM imports; if using CommonJS, consider dynamic import() or transpilation.
affects: >=2.1.4
gotchaNo browser CJS bundle; browser consumers must use bundler with ESM.
fix
Ensure bundler (webpack/rollup) is configured for ESM or switch to Node.js.
affects: >=2.1.4
Errors
Common errors & fixes
Cannot find module 'concordialang-types' or its corresponding type declarations.
Package not installed or missing @types/concordialang-types (unnecessary as types are bundled).
fix
Run 'npm install concordialang-types' and ensure tsconfig 'node_modules' resolution works.
TypeError: concordialang_types_1.AbstractDatabase is not a constructor
Trying to instantiate AbstractDatabase directly (it's an interface, not a class).
fix
Create a class that implements AbstractDatabase instead of instantiating it directly.
Module '"concordialang-types"' has no exported member 'X'. Did you mean to use 'import X from "concordialang-types"'?
Importing a member that was removed in v2.0.0 (e.g., TestCase, UIProperty).
fix
Check package version. If using v2+, only Location, AbstractDatabase, and TestScriptExecutionResult are available. Use v1.x for removed types.
Upgrade
Version history
2.1.6latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
31 hits · last 30 days
node
28
OpenAI (training)
1
Resources
concordialang-types — npm install concordialang-types · libregistry