-
Notifications
You must be signed in to change notification settings - Fork 139
Open
Labels
feature requestNew feature or requestNew feature or requestsemanticsUnexpected or unsound behaviorsUnexpected or unsound behaviors
Description
I've just completed converting several thousand lines of lua to teal for two projects. I'm having to revert that change in one project, though, because teal has no mechanism to either:
- ignore lines/files/blocks or
- treat
anyas a flexible "could-be-anything", ala TypeScript
This means that using a 3rd-party lua module without teal types is impossible. You can require the module via a *.d.tl hack like:
local primitives: any
return primitives
...but then every single use will error because, unlike TS, Teal treats any as closed, rather than open:
cannot index key 'square' in variable 'primitives' of type <any type>
So unless you're willing to build types for literally everything you pull in, which is often infeasible, there's just no way to have forward progress.
Metadata
Metadata
Assignees
Labels
feature requestNew feature or requestNew feature or requestsemanticsUnexpected or unsound behaviorsUnexpected or unsound behaviors