Add static typing of builtin objects and functions
Open
P1
team-Starlark-Interpreter
type: feature request
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 72
Description
- [x] `TypeTagger` should type `Binding`s for predeclared/universal symbols by retrieving their `StarlarkType` from the module object. The static `TypeChecker` should make use of this information to catch type errors involving these symbols.
- [x] `StarlarkType`s should be able to report their available field/method names and associated types. These should be queried within `TypeChecker`'s handling of `DotExpression`.
- [ ] Type signatures for builtin objects (e.g. global modules like `attr`, or types like `depset`) should be stored in and retrieved from the `StarlarkClassDescriptor`.
Contributor guide
Assessment
This issue has not been assessed yet.