<@U33H6SB2B> just seen a new `JsPrimitive` annotat...
# javascript
e
@turansky just seen a new
JsPrimitive
annotation on wrappers, from Seskar. What does it do?
t
It's for
Symbol
and
BigInt
. It will correct
is/as
operator calls
Copy code
// Kotlin
a is Symbol

// JS - default
a instanceof Symbol

// JS - with plugin
typeof a === 'symbol'
e
Sounds good! Thanks
Functional question: I see you wrapped
Copy code
jsTypeOf(o) == type
in your own function
seskar.js.internal.hasType
. Is this because it's easier to implement the compiler transformation? (instead of building the
jsTypeOf(o) == type
expression)
t
Is this because it's easier to implement the compiler transformation?
Yes
gratitude thank you 1
In any case
hasType
will be inlined