Repository navigation
refactor: port to oxc - #803
Draft
nathanwhit wants to merge 11 commits into
Draft
nathanwhit wants to merge 11 commits into
nathanwhit wants to merge 11 commits into
Conversation
Deno Individual Contributor License AgreementAll contributors have signed the CLA. Thank you! This is an automated message from CLA Assistant |
Ports the swc-based changes from main onto the oxc code: heritage member docs (denoland#842), variable alias resolution (denoland#850), shadowed export merging (denoland#838), spread element inference (denoland#852), void return inference for arrow functions (denoland#825), deno-doc-ignore directives (denoland#829), identifier diagnostic locations (denoland#831), pure type alias re-exports (denoland#816). Adapts to oxc 0.155 (ExportNamedDeclaration / TSModuleDeclaration splits, Class heritage, TSIndexSignature parameter, JSStr string values) and Rust 1.97. Spec expectation changes: object literal computed keys render as `[t]` rather than `[[t]]`; `export * as ns` symbols are located at the statement start; a private const spread into an exported `as const` array is reported as a private-type-ref (deno_graph now tracks value deps of `as const` expressions); an `infer R` binding no longer links to an unrelated type parameter.
- resolve_type_ref: a reference that semantic analysis bound to a non-module-level symbol (type parameter, mapped type parameter) or that was never analyzed (JSDoc type strings) is a typeParam resolution, and an `infer X` binding is unresolved, matching swc's resolver behavior - JSDoc types keep their resolutions (clear_resolutions removed) - computed property keys keep their source text including brackets - destructured bindings get their types from the referenced variable's annotation (scope-aware lookup) and inferred initializer types - restore main's test expectations
…expect-error - nested namespace declarations are located at the outer `namespace` keyword (the symbol declaration range) like with swc - columns count a tab as the indent width again via deno_ast's new `line_and_column_display_with_indent_width` - pin deno_graph/deno_ast to the latest oxc-port revisions The two html snapshots that linked the `R` of `infer R ? R : any` to an unrelated construct signature type parameter are re-blessed: that link came from an swc scope leak and the unlinked output matches TypeScript semantics and main's behavior for every other `infer` binding.
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.
needs denoland/deno_ast#331 and denoland/deno_graph#638