tjs-lang 0.2.8 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,7 +5,7 @@ import type { Node } from 'acorn';
5
5
  import type { SeqNode } from '../builder';
6
6
  /** Represents a type extracted from value patterns */
7
7
  export interface TypeDescriptor {
8
- kind: 'string' | 'number' | 'boolean' | 'null' | 'undefined' | 'array' | 'object' | 'union' | 'any';
8
+ kind: 'string' | 'number' | 'integer' | 'non-negative-integer' | 'boolean' | 'null' | 'undefined' | 'array' | 'object' | 'union' | 'any';
9
9
  nullable?: boolean;
10
10
  /** For arrays: the element type */
11
11
  items?: TypeDescriptor;
@@ -36,8 +36,10 @@ export interface RuntimeType<T = unknown> {
36
36
  readonly schema?: Schema;
37
37
  /** The predicate function (if predicate-based) */
38
38
  readonly predicate?: (value: unknown) => boolean;
39
- /** Example value (for documentation and implicit testing) */
39
+ /** Example value (for documentation and signature testing) */
40
40
  readonly example?: T;
41
+ /** Multiple example values (from schema metadata, for autocomplete hints) */
42
+ readonly examples?: T[];
41
43
  /** Default value (for instantiation) */
42
44
  readonly default?: T;
43
45
  /** Brand for type identification */