Spaces:
Paused
Paused
Download node_modules/@plotly/mapbox-gl/src/style-spec/util/result.js from Leon4gr45/UserSyncFrontend: direct link, hf CLI and curl.
- Browser
- Download file 523 Bytes
-
https://huggingface.co/spaces/Leon4gr45/UserSyncFrontend/resolve/main/node_modules/%40plotly/mapbox-gl/src/style-spec/util/result.js
- Command line
-
hf download hf://spaces/Leon4gr45/UserSyncFrontend/node_modules/@plotly/mapbox-gl/src/style-spec/util/result.js
-
curl -L -o result.js https://huggingface.co/spaces/Leon4gr45/UserSyncFrontend/resolve/main/node_modules/%40plotly/mapbox-gl/src/style-spec/util/result.js
523 Bytes
| // @flow | |
| /** | |
| * A type used for returning and propagating errors. The first element of the union | |
| * represents success and contains a value, and the second represents an error and | |
| * contains an error value. | |
| * @private | |
| */ | |
| export type Result<T, E> = | |
| | {| result: 'success', value: T |} | |
| | {| result: 'error', value: E |}; | |
| export function success<T, E>(value: T): Result<T, E> { | |
| return {result: 'success', value}; | |
| } | |
| export function error<T, E>(value: E): Result<T, E> { | |
| return {result: 'error', value}; | |
| } | |