Skip to content

Is there anyway to tell if a type a global/built-in type #986

Closed Answered by kdy1
awareness481 asked this question in Q&A
Discussion options

You must be logged in to vote

You can use env.get_global_type.

Example:

let obj = self.env.get_global_type(span, &js_word!("Function"))?;

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@awareness481
Comment options

Answer selected by awareness481
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants