-
-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: infer types for waku router #854
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
b89bb69
to
ac4f082
Compare
ac4f082
to
21aca71
Compare
21aca71
to
a80ab15
Compare
a80ab15
to
57375f1
Compare
@dai-shi & @sandren I just want to mention that while the enforcement of returning the pages here would mean a slight breaking change to Right now, I am just inferring |
@dai-shi How would you feel about turning noErrorTruncation on in one of the tsconfigs? I am currently setting this to true locally while developing then leaving it out of my commits, but here is why it is nice for me: This is without setting noErrorTruncation: With adding |
d1e5a2a
to
399ab1f
Compare
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
This results in the ts preview of vscode not truncating the hovered information of a type or error. Helpful for inspecting long types. Follow up to: #854 (comment) Co-authored-by: Tyler <[email protected]>
c133845
to
f735a35
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some comments:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some more comments 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hope it makes sense.
// This needs type annotations for the return type of createPages | ||
// @see https://github.com/microsoft/TypeScript/issues/42873#issuecomment-2065572017 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was curious about this explicit annotation in other repo.
Does the linked issue commend suggest the explicit annotation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes... it is apparently a known issue with type inference inside pnpm projects with symlinked packages.
After visiting the discord for arktype I was linked to that issue on the Typescript repo that I left in the comments. Here is the summary that I ended up putting on the arktype discord after a chat with their author:
Yep! all makes sense and were simple changes I think. 215e6e2 |
@dai-shi some idea names for
Also, are there other changes you'd like to see with this PR? |
I'll do a full review later in this week. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise, LGTM. Note that I didn't read the code in detail.
a2c3d54
to
242658a
Compare
Sounds good 👍 - squashed and rebased. Should be good to merge 😄 |
Currently this changeset gets
createPages
ready to return an inferred type for each response ofcreatePage
TODO:
<Link />
component