Skip to content

PoC %typeof - #7870

Draft
zth wants to merge 4 commits into
masterfrom
poc-typeof
Draft

zth wants to merge 4 commits into
masterfrom
poc-typeof

Conversation

@zth

@zth zth commented Sep 10, 2025

Copy link
Copy Markdown
Member

No description provided.

@pkg-pr-new

pkg-pr-new Bot commented Sep 10, 2025 •

Copy link
Copy Markdown

Open in StackBlitz

rescript

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

@rescript/darwin-arm64

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

@rescript/darwin-x64

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

@rescript/linux-arm64

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

@rescript/linux-x64

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

@rescript/runtime

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

@rescript/win32-x64

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

commit: 5120753

Comment thread compiler/ml/typetexp.ml
raise (Error_forward (Builtin_attributes.error_of_extension ext))
| Ptyp_extension ext -> (
match ext with
| {txt = "typeof"; loc = ext_loc}, payload -> (

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Wow, this is surprisingly easy.
Might inspire me to take a stab at something like %nameof()

@zth zth added this to the v12.1 milestone Oct 7, 2025
@cknitt cknitt modified the milestones: v12.1, v13 Jan 13, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants