Skip to content

Bring back SourceFile.EndOfFileToken - #1257

Merged
Jake Bailey (jakebailey) merged 19 commits into
microsoft:mainfrom
Andarist:eof
Jul 2, 2025
Merged

Bring back SourceFile.EndOfFileToken#1257
Jake Bailey (jakebailey) merged 19 commits into
microsoft:mainfrom
Andarist:eof

Conversation

@Andarist

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread internal/astnav/tokens_test.go Outdated
Comment thread internal/parser/reparser.go Outdated
Comment thread internal/parser/parser.go
Comment thread _packages/api/src/node.ts

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still reviewing baselines, but here are some out of order comments.

Comment thread internal/astnav/tokens.go Outdated
Comment thread internal/astnav/tokens_test.go Outdated
Comment thread internal/parser/parser.go
Comment thread internal/parser/parser.go Outdated
Comment thread internal/parser/reparser.go Outdated
Comment thread internal/parser/reparser.go

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes based on my previous comments, since this batch is just guesses for why diffs have happened.

declare const x = 12;
export { x as default };
export type default = string | number;
export type _default = string | number;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, but this is weird, no?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is, the comment above this says the behavior is borked - and the type alias declaration here is the same in Strada:
https://github.com/microsoft/TypeScript/blob/78c16795cdee70b9d9f0f248b6dbb6ba50994a59/tests/baselines/reference/jsDeclarationsDefaultsErr.js#L81-L84

@jakebailey

Copy link
Copy Markdown
Member

Seems like it needs more baseline updates.

@jakebailey

Copy link
Copy Markdown
Member

Still a test failure?

+--- old.partiallyNamedTuples2.types
++++ new.partiallyNamedTuples2.types
+@@= skipped -37, +37 lines =@@
+ const matches = x.get(id1);
+ >matches : Iterable<[id2: string, object]>
+ >x.get(id1) : Iterable<[id2: string, object]>
+->x.get : <Key extends [id1: string, id2: string] | [id1: string] | []>(...key: Key) => GetResult<[id1: string, id2: string], Key, object>
++>x.get : <Key extends [] | [id1: string] | [id1: string, id2: string]>(...key: Key) => GetResult<[id1: string, id2: string], Key, object>
+ >x : MultiKeyMap<[id1: string, id2: string], object>
+->get : <Key extends [id1: string, id2: string] | [id1: string] | []>(...key: Key) => GetResult<[id1: string, id2: string], Key, object>
++>get : <Key extends [] | [id1: string] | [id1: string, id2: string]>(...key: Key) => GetResult<[id1: string, id2: string], Key, object>
+ >id1 : string

Seems to have been a bad merge with main?

@Andarist

Copy link
Copy Markdown
Contributor Author

weird, maybe I have forgotten to git add this one single baseline after syncing with main. But either way, this is still blocked on the GetTouchingPropertyName difference - I hope to fix this before Friday but we'll see how it goes

Comment thread internal/transformers/declarations/transform.go Outdated

@jakebailey Jake Bailey (jakebailey) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The core of this PR is fine, but I think we're still waiting on the removal of the extra unrelated bits?

@Andarist

Copy link
Copy Markdown
Contributor Author

Jake Bailey (@jakebailey) I think I addressed everything that had to be addressed here and it should be good to go now

@jakebailey

Copy link
Copy Markdown
Member

@Andarist

Copy link
Copy Markdown
Contributor Author
  1. this is outdated - I have not included the asked change because all tests pass without it. The change I've made is required by the tests in the codebase
  2. this has slipped my mind. I removed this now

@jakebailey

Copy link
Copy Markdown
Member

Thanks!

Comment thread internal/transformers/declarations/transform.go Outdated
@jakebailey
Jake Bailey (jakebailey) added this pull request to the merge queue Jul 2, 2025
Merged via the queue into microsoft:main with commit de7975a Jul 2, 2025
22 checks passed
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.

4 participants