extend/ENV: remove fake EnvMethods
from RBI
This commit is contained in:
parent
4482e25cb2
commit
d24686ac50
@ -1,42 +1,6 @@
|
||||
# typed: strict
|
||||
|
||||
# @!visibility private
|
||||
module EnvMethods
|
||||
include Kernel
|
||||
|
||||
sig { params(key: String).returns(T::Boolean) }
|
||||
def key?(key); end
|
||||
|
||||
sig { params(key: String).returns(T.nilable(String)) }
|
||||
def [](key); end
|
||||
|
||||
sig { params(key: String).returns(String) }
|
||||
def fetch(key); end
|
||||
|
||||
sig { params(key: String, value: T.nilable(T.any(String, PATH))).returns(T.nilable(String)) }
|
||||
def []=(key, value); end
|
||||
|
||||
sig { params(block: T.proc.params(arg0: [String, String]).returns(T::Boolean)).returns(T::Hash[String, String]) }
|
||||
def select(&block); end
|
||||
|
||||
sig { params(block: T.proc.params(arg0: String).void).void }
|
||||
def each_key(&block); end
|
||||
|
||||
sig { params(key: String).returns(T.nilable(String)) }
|
||||
def delete(key); end
|
||||
|
||||
sig {
|
||||
params(other: T.any(T::Hash[String, String], Sorbet::Private::Static::ENVClass))
|
||||
.returns(Sorbet::Private::Static::ENVClass)
|
||||
}
|
||||
def replace(other); end
|
||||
|
||||
sig { returns(T::Hash[String, String]) }
|
||||
def to_hash; end
|
||||
end
|
||||
|
||||
module EnvActivation
|
||||
include EnvMethods
|
||||
include Superenv
|
||||
end
|
||||
|
||||
|
@ -1,7 +1,16 @@
|
||||
# typed: strict
|
||||
|
||||
module SharedEnvExtension
|
||||
include EnvMethods
|
||||
requires_ancestor { Sorbet::Private::Static::ENVClass }
|
||||
|
||||
# Overload to allow `PATH` values.
|
||||
sig {
|
||||
type_parameters(:U).params(
|
||||
key: String,
|
||||
value: T.all(T.type_parameter(:U), T.nilable(T.any(String, PATH))),
|
||||
).returns(T.type_parameter(:U))
|
||||
}
|
||||
def []=(key, value); end
|
||||
end
|
||||
|
||||
# @!visibility private
|
||||
|
Loading…
x
Reference in New Issue
Block a user