Repository navigation
Keep the .d.ts-only types of a package compiled from its JavaScript - #1729
Merged
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The compiler compiles itself natively, and an empty array in an object literal took number[] there, so the enum entry did not match the declaration record. The coverage snapshot of native-npm-imports now counts one dynamic-tier statement instead of three: the program's `const point: Vector` takes the interface from the package's .d.ts instead of any.
… and .mjs entries
- A local `export { Kind }` of a name the declaration file imports
(`import type { Kind } from "./kinds"`) now resolves like
`export { Kind } from "./kinds"`; it was dropped.
- The typedefs now reach a runtime entry outside the .js/.cjs rewrite
path (an .mjs file).
- Only data shapes are re-exported: an interface, type alias or enum
with no method, call or construct signature, function type or other
computed type, whose referenced types are data shapes too. An
interface with methods describes the package's JavaScript objects and
stays as the JavaScript types it (@opentelemetry/api's Counter).
- NPM_STATIC_TYPES_SUFFIX moves to npm-static.ts, so that module does
not import the syntax modules (the self-hosted frontend tests compile
it natively).
…ata shape
The data-shape check answered a type that refers back to a type still
being checked as a data shape and recorded that answer before the
outer check finished. With `Branch { child: Tree; handle: Handle }` and
`Tree { parent: Branch | null }`, checking Branch first recorded Tree as
a data shape, and Tree was re-exported although Branch reaches an
interface with a method. The check now walks every type reachable from
the queried one before it records any of them as a data shape, and
records the types on the path to a non-data type as non-data.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
anywhen the package compiled from its JavaScript, so declarations using them took the initializer's type.