You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This means that modules and pre-declared functions are not properly typed in the Full TypeScript chapter, and it would be good to add support for them down the line.
To add support for pre-declared functions (without exposing the implementation of the functions to the user), one possible way is to create a lightweight file containing the types of each function, then replace the any type in the constant declaration with the correct type for the function.
In terms of module support, we can perhaps wait until #1399 is solved, and see if the same approach can be used here.
The text was updated successfully, but these errors were encountered:
Currently, the Full TypeScript chapter uses the below workaround for pre-declared functions and prelude functions:
js-slang/src/parser/fullTS/index.ts
Lines 25 to 44 in 0dd4d8c
Any errors related to modules are also ignored:
js-slang/src/parser/fullTS/index.ts
Lines 64 to 79 in 0dd4d8c
This means that modules and pre-declared functions are not properly typed in the Full TypeScript chapter, and it would be good to add support for them down the line.
To add support for pre-declared functions (without exposing the implementation of the functions to the user), one possible way is to create a lightweight file containing the types of each function, then replace the
any
type in the constant declaration with the correct type for the function.In terms of module support, we can perhaps wait until #1399 is solved, and see if the same approach can be used here.
The text was updated successfully, but these errors were encountered: