mirror of
https://github.com/pesde-pkg/tooling.git
synced 2025-05-04 10:43:58 +01:00
Formerly, we used metatables to get custom `Option` and `Result` objects which were difficult to type properly, leading to a lot of `unknown` and `any` casts. This refactor fixes it by making extensions opt-in, where we import the extension methods separately from the original implementations, thereby allowing us to not have to typecast things everywhere.
7 lines
278 B
Text
7 lines
278 B
Text
local Result = require("../../lune_packages/result")
|
|
type Result<T, E> = Result.Result<T, E>
|
|
|
|
export type PlatformError = "NoPatternDetected" | "NoExecutableDetected" | "UnknownExecutableField"
|
|
export type PlatformResult<T> = Result<T, PlatformError>
|
|
|
|
return "<PlatformResult>"
|