-
Notifications
You must be signed in to change notification settings - Fork 24
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(language-server): Add types for types in LSP API #1078
Conversation
import scala.scalajs.js.JSConverters.* | ||
import scalajs.js | ||
|
||
sealed trait TypeJs extends js.Object { |
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.
Why not model them as enum
?
Also I don't quite understand: don't you need to annotate class fields with @JSExport
? Otherwise they should not be visible in js, should they?
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.
enum
don't work with js.Object
as far as I know.
Also, @JSExport
makes scala class accessible from JS. extends js.Object
makes these objects AS JS objects. So, I think we will rewrite definitions on js.Object
too, to avoid redundant proxy conversions
language-server/language-server-api/.js/src/main/scala/aqua/lsp/TypeJs.scala
Outdated
Show resolved
Hide resolved
"examples": "jest", | ||
"pubsub": "node -r ts-node/register src/pubsub.ts", | ||
"exec": "npm run compile-aqua && npm run prettify-compiled && node -r ts-node/register src/index.ts", | ||
"run": "node -r ts-node/register src/index.ts", | ||
"compile-aqua": "node --loader ts-node/esm ./src/compile.ts", | ||
"compile-aqua:air": "aqua -i ./aqua/ -o ./compiled-air -a", |
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.
"compile-aqua:air": "aqua -i ./aqua/ -o ./compiled-air -a", |
Description
Add JS representation of types in compiler
Checklist
Reviewer Checklist