Skip to content

Use native private members in core tooling - #5943

Open
Bharat Middha (bmiddha) wants to merge 4 commits into
bmiddha/fix-no-new-null-native-privatefrom
bmiddha/native-private-fields-core-api
Open

Use native private members in core tooling#5943
Bharat Middha (bmiddha) wants to merge 4 commits into
bmiddha/fix-no-new-null-native-privatefrom
bmiddha/native-private-fields-core-api

Conversation

@bmiddha

@bmiddha Bharat Middha (bmiddha) commented Aug 19, 2026

Copy link
Copy Markdown
Member

Summary

  • convert TypeScript-private fields, methods, and accessors across API Extractor, API Documenter, and core shared libraries to ECMAScript #private members
  • replace private-member destructuring with direct private access
  • retain node-core-library TypeScript-private members whose rolled-up declarations are consumed by ES5-target fixtures, where native private declarations fail with TS18028
  • keep package behavior and public APIs unchanged

Validation

  • built the full affected dependency graph, including about 187 downstream projects
  • tested all 15 affected packages with test suites

Dependency

Stacked on #5947, which fixes @rushstack/no-new-null handling for ECMAScript private members. Narrow suppressions remain because these packages consume the released decoupled plugin; they can be removed after the patched plugin is published and adopted.

Convert TS private class property declarations to native #private
fields across api-extractor, api-documenter, and core libraries,
stripping the conventional leading underscore. Excludes
node-core-library: its bundled rollup .d.ts is consumed by ES5-target
build-test fixtures, and #private syntax anywhere in that file breaks
their typecheck (TS18028).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8ebd5bf2-c44b-42d5-be25-e7936d4b0a14
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 8ebd5bf2-c44b-42d5-be25-e7936d4b0a14
Convert TypeScript private method and getter/setter declarations to
native #private syntax across api-documenter, api-extractor,
api-extractor-model, credential-cache, debug-certificate-manager,
heft-config-file, lookup-by-path, npm-check-fork, operation-graph,
package-extractor, stream-collator, terminal, ts-command-line,
typings-generator, worker-pool, and doc-plugin-rush-stack, stripping
the conventional leading underscore. Extends the prior #private field
conversion to methods and accessors using the same symbol-aware tool.

Adds an eslint-disable-next-line @rushstack/no-new-null suppression to
SourceMapper#getSourceMap, matching the existing suppression on its
sibling private field, since converting the method to native #private
syntax exposed it to the same decoupled-lint-rule gap.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 8ebd5bf2-c44b-42d5-be25-e7936d4b0a14
@bmiddha Bharat Middha (bmiddha) changed the title Use native private fields in core tooling Use native private members in core tooling Aug 20, 2026
…rivate' into bmiddha/native-private-fields-core-api
@bmiddha
Bharat Middha (bmiddha) changed the base branch from main to bmiddha/fix-no-new-null-native-private August 20, 2026 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Needs triage

Development

Successfully merging this pull request may close these issues.

1 participant