mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00

- move some things out of `extend` that don't really fit there e.g. `Module`s that are included but not doing any overriding/monkeypatching - move some code into `extend/os` to fix all remaining `rubocop:todo Homebrew/MoveToExtendOS`s - remove some unneeded `bundle` skipper code that doesn't really make sense given our current bottling strategy - extract some `Pathname` extensions to `extend/pathname` for separate files - move a `ENV` `Kernel` extension into `kernel.rb` - `odeprecate` a seemingly unused backwards compatibility method - move `readline_nonblock` from a monkeypatch to a `ReadlineNonblock.read` method as its only used in one place - fix up a link in documentation
27 lines
874 B
Ruby
27 lines
874 B
Ruby
# typed: strict
|
|
|
|
module OnSystem::MacOSOnly
|
|
sig { params(arm: T.nilable(String), intel: T.nilable(String)).returns(T.nilable(String)) }
|
|
def on_arch_conditional(arm: nil, intel: nil); end
|
|
end
|
|
|
|
module OnSystem::MacOSAndLinux
|
|
sig {
|
|
params(
|
|
macos: T.nilable(T.any(T::Array[T.any(String, Pathname)], String, Pathname)),
|
|
linux: T.nilable(T.any(T::Array[T.any(String, Pathname)], String, Pathname)),
|
|
).returns(T.nilable(T.any(T::Array[T.any(String, Pathname)], String, Pathname)))
|
|
}
|
|
def on_system_conditional(macos: nil, linux: nil); end
|
|
|
|
sig {
|
|
type_parameters(:U)
|
|
.params(block: T.proc.returns(T.type_parameter(:U)))
|
|
.returns(T.type_parameter(:U))
|
|
}
|
|
def on_macos(&block); end
|
|
|
|
sig { params(arm: T.nilable(String), intel: T.nilable(String)).returns(T.nilable(String)) }
|
|
def on_arch_conditional(arm: nil, intel: nil); end
|
|
end
|