Comments (1)
Hello @chloelbn, Thank you for opening this issue.
I think it is the intended behavior. I'm not 100% sure about these. Let me know if it's not correct.
Steep says there is no def_delegators
method.
I guess extend Forwardable
is missing in the Client
declaration in the .rbs file.
class Client
extend Forwardable
def get_task_status(String, String task_id, ?opts: Hash[untyped, untyped]) -> void
end
Steep cannot reason the type (even existence) of the read
and write
method defined by def_delegators
call.
The method definitions without def
syntax are also complicated. Because the tool doesn't know the implementation of def_delegators
. It doesn't know what the method will do for the class.
Steep (RBS) wants you to write them in RBS files.
class Client
extend Forwardable
def get_task_status(String, String task_id, ?opts: Hash[untyped, untyped]) -> void
def read: (Symbol, String, untyped, untyped opts) -> Response
def write: () -> Response
end
Why is it so redundant?
It is the design of RBS. The files contain everything type checkers need. RBS is the place everything is written down, and users and tools can understand your library with it.
I know meta programming doesn't work well with this design... but I haven't found a better way for it.
from steep.
Related Issues (20)
- Ruby::ArgumentTypeMismatch Cannot pass a value of type `(::Type | nil)` as an argument of type `::Type` HOT 4
- Type check is not done when using rightward assignment to destructure the return value of a method HOT 1
- Unexpected error with forward argument
- LSP Integration fails HOT 4
- type narrowing for block_given? HOT 1
- UnknownTypeName exception on 3rd party type signature HOT 5
- Sharing `--jobs` options via environment variables or `Steepfile`
- Wildcards in `check` directive do not expand in Steepfile
- Wildcard not expanding in Steepfile, affecting `steep stats`
- steep appears to be crashing when it can't find signatures for a gem.
- Test issue
- set_backtrace with the backtrace of another exception
- Steep 1.7.0 stuck when running check HOT 5
- Unexpected MethodParameterMismatch with positional argument after optional argument
- Filtered collection type inference
- UnexpectedError: Unexpected self_type: untyped(RuntimeError)
- symlinked files and gems on cloudsmith do not seem to work HOT 1
- Symbol#to_proc passed as an optional block argument causes a warning "Cannot pass a value of type `::Proc` as a block-pass-argument" HOT 1
- Arithmetic operations on union-type numbers cause method overloading errors HOT 1
- steep misunderstands string and array slice types HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from steep.