-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
LSP: Provide output.json option for non-VS Code clients #972
Conversation
value := result.Value | ||
if result.IsUndefined { | ||
// Display undefined as an empty object | ||
// we could also go with "<undefined>" or similar |
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.
I quite like the idea of calling it undefined
rather than the empty object myself...
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.
I'm not too sure, as it makes it hard to differentiate from the actual string value of "undefined"...
Using "" as print
does is a little better. But for now I went with empty object as that's what opa eval
prints by default, e.g.
> opa eval input.foo
{}
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.
LGTM
And use a reader instead of a string for input as suggested by @charlieegan3 Signed-off-by: Anders Eknert <anders@styra.com>
c5a68ca
to
911651e
Compare
And use a reader instead of a string for input as suggested by @charlieegan3 Signed-off-by: Anders Eknert <anders@styra.com>
And use a reader instead of a string for input as suggested by @charlieegan3 Signed-off-by: Anders Eknert <anders@styra.com>
And use a reader instead of a string for input as suggested by @charlieegan3