Skip to content

Conversation

mediremi
Copy link
Member

@mediremi mediremi commented Aug 30, 2025

Stdlib.res contains these type aliases, but we were not handling them in TypeUtils.completionPathFromMaybeBuiltin, which meant completions did not work for them (see failing test here).

type null<+'a> = Primitive_js_extern.null<'a>
type undefined<+'a> = Primitive_js_extern.undefined<'a>
type nullable<+'a> = Primitive_js_extern.nullable<'a>

@mediremi mediremi requested a review from zth August 30, 2025 17:47
@mediremi mediremi marked this pull request as ready for review August 30, 2025 17:47
Copy link

pkg-pr-new bot commented Aug 30, 2025

Open in StackBlitz

rescript

npm i https://pkg.pr.new/rescript-lang/rescript@7826

@rescript/darwin-arm64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/darwin-arm64@7826

@rescript/darwin-x64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/darwin-x64@7826

@rescript/linux-arm64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/linux-arm64@7826

@rescript/linux-x64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/linux-x64@7826

@rescript/runtime

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/runtime@7826

@rescript/win32-x64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/win32-x64@7826

commit: cd827e3

Copy link
Member

@zth zth left a comment

Choose a reason for hiding this comment

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

Great stuff! Anything more from that file we need to handle explicitly?

@mediremi
Copy link
Member Author

The other type aliases defined in Stdlib.res are:

  • date -> Date.t (autocomplete works ✔️)
  • undefined -> Primitive_js_extern.undefined (no Stdlib_Undefined module exists - only Js_Undefined has functions operating on this type)
  • lazy_t (deprecated)

So looks like we're handling all the types we should 🎉

@mediremi mediremi enabled auto-merge (squash) August 31, 2025 09:28
@mediremi mediremi merged commit e0528c0 into rescript-lang:master Aug 31, 2025
25 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.

2 participants