Skip to content

feat(tsdefinition): short-name aliases + namespace mapping + linq.d.t… - #2

Closed
windischb wants to merge 2 commits into
developfrom
feat/v3.1.4-tsdefinition
Closed

windischb wants to merge 2 commits into
developfrom
feat/v3.1.4-tsdefinition

Conversation

@windischb

Copy link
Copy Markdown
Collaborator

…s auto-emission

v3.1.4 lands the "Monaco hovers show the short name instead of the 80-char namespace path" story, with one config that works for .d.ts AND NewObject:

  • New IJsTsDefinitionContributor extension point; AddLinq auto-registers a contributor so linq.d.ts surfaces in GetTsDefinitions() output — closes the "linq.* is invisible in Monaco" gap from the FR
  • AddTypeAlias() / MapNamespace(prefix, target) on JsEvalBuilder — aliases emit at root scope in the .d.ts AND resolve via NewObject(...); single source of truth lives on JsEngineOptions so the two layers cannot drift apart
  • DefinitionBuilder.AddType(type, alias) / MapNamespace(source, target) for standalone (non-DI) consumers
  • Collision detection fires only when a user rule is involved; natural same-name collisions (Span.Enumerator vs ReadOnlySpan.Enumerator) keep the v3.1.3 interface-merging behavior so unconfigured consumers don't regress
  • System.* excluded from namespace mapping by default
  • 8 new regression tests, 314/314 suite green

Pure additive release. No breaking changes to any existing API.

windischb and others added 2 commits April 19, 2026 12:58
…s auto-emission

v3.1.4 lands the "Monaco hovers show the short name instead of the 80-char
namespace path" story, with one config that works for .d.ts AND NewObject:

- New IJsTsDefinitionContributor extension point; AddLinq auto-registers
  a contributor so linq.d.ts surfaces in GetTsDefinitions() output —
  closes the "linq.* is invisible in Monaco" gap from the FR
- AddTypeAlias<T>() / MapNamespace(prefix, target) on JsEvalBuilder —
  aliases emit at root scope in the .d.ts AND resolve via NewObject(...);
  single source of truth lives on JsEngineOptions so the two layers
  cannot drift apart
- DefinitionBuilder.AddType(type, alias) / MapNamespace(source, target)
  for standalone (non-DI) consumers
- Collision detection fires only when a user rule is involved;
  natural same-name collisions (Span.Enumerator vs ReadOnlySpan.Enumerator)
  keep the v3.1.3 interface-merging behavior so unconfigured consumers
  don't regress
- System.* excluded from namespace mapping by default
- 8 new regression tests, 314/314 suite green

Pure additive release. No breaking changes to any existing API.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@windischb windischb closed this Apr 19, 2026
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