Skip to content

fix: preserve property definitions and documentation across derived types - #239

Merged
andrewzolotukhin merged 1 commit into
developmentfrom
fix/schema-property-navigation
Oct 2, 2026
Merged

andrewzolotukhin merged 1 commit into
developmentfrom
fix/schema-property-navigation

Conversation

@andrewzolotukhin

Copy link
Copy Markdown
Contributor

Description

Go to Definition on query(knex, UserSchema).where(t => t.firstName, 'John')
previously returned no definition, although the equivalent getErrorsFor
selector navigated to the schema. Several derived property types also lost
their original hover documentation.

Preserve property origins through mapped types and relation metadata. This
restores navigation and JSDoc for query selectors, decoded rows, projections,
write payloads, relation includes, mapper targets, JSON Schema inferred values,
composed API groups, injected services, and shared deep-merge properties.
Renamed projection results navigate to the projection declaration. Existing
property types, filtering, modifiers, merge precedence, and runtime behavior
are preserved.

The new language-service suite exercises the published declarations from
TypeScript and checked JavaScript, including imported schemas and existing
working schema, form, and client APIs. It also checks compatibility for indexed
sources, optional/readonly fields, relation filtering, and mapping completeness.

TypeScript still omits hover JSDoc on some union-context update object literals;
Go to Definition is covered and works for those properties.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Refactor / internal improvement

Validation

  • Original implementation: 79 navigation/hover assertions failed in the initial regression suite.
  • Final suite: 172 navigation, hover, and compatibility checks pass with TypeScript 6.0.3.
  • npm run lint — passed.
  • npm run build — passed, all 24 build tasks.
  • npm run test — passed, 4,717 tests across 233 test files; no type errors.
  • npm run typecheck:schema-site — passed.
  • npm run typecheck:docs-site — passed.

Checklist

  • I've added tests for my changes
  • I've run npm run lint and fixed any issues
  • I've run npm run test and all tests pass
  • I've added a changeset (npx changeset) if this changes package behavior

@andrewzolotukhin
andrewzolotukhin merged commit 28cb7aa into development Oct 2, 2026
3 checks passed
@andrewzolotukhin
andrewzolotukhin deleted the fix/schema-property-navigation branch October 2, 2026 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant