Open renkun-ken opened 4 years ago
With typescript style type definition file
will help simplify the work, aka typedef
for R object.
R6 classes are already typed. They will be easier to process.
Sounds interesting, would you like to elaborate?
Python introduced https://docs.python.org/3/library/typing.html
and pylance is using https://github.com/microsoft/pyright for the information, which is similar to typescript and javascript.
@qinwf Just noticed Pylance yesterday. Looks quite promising. Do you have any idea how we could benefit from its design or implementation?
Pylance is based on type hints feature built into Python 3.5+.
There is no typing library for R now. A gradual type system is required to enable features like it.
To build a gradual type system, there will be a frontend to do type checking for R code without running the code.
We may provide completion for list-like objects in package such as
.Machine
,.Platform
, and objects defined in packages such as R6 classes since their elements are known.In contrast with https://github.com/Ikuyadeu/vscode-R/pull/165 which provides completion for elements in list-like objects in a live R session, languageserver may do similar for list-like objects in packages.