Generic type declarations and utilities for converting between TypeScript, GraphQL, JSON Schema and other type systems. Current stable version: 3.1.0. Pure ESM package requiring Node >=14.13.1 || >=16.0.0. Used by packages like core-types-json-schema, core-types-ts, core-types-graphql, core-types-suretype, and typeconv. Key differentiator: provides a minimal, well-defined set of types (any, null, boolean, string, number, object, array, tuple, ref, union, intersection) as an interchange format, with simplification, validation, and traversal functions. Supersedes ad-hoc type conversion by providing a normalized intermediate representation.
npm install core-typesNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates importing core-types types and functions, creating a type, simplifying unions, validating, traversing, and using some().
Ensure your project uses ES modules (type: 'module' in package.json or .mjs files) and Node version >=14.13.1.
Use traverse with a custom predicate instead of some().
Preserve descriptions by applying them after simplification, or check that they are not critical before simplifying.
Install additional packages (e.g., core-types-json-schema, core-types-ts) for conversion to specific formats.
Change to import syntax (e.g., import { simplify } from 'core-types') and ensure your project uses ES modules.Run npm install core-types and verify import path is correct (no subpath imports needed).
Use named import: import { simplify } from 'core-types'.No dependency data recorded yet.