This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const Iphone = { | |
| "17 pro max": { | |
| width: 1320, | |
| height: 2868, | |
| }, | |
| "17 pro": { | |
| width: 1206, | |
| height: 2622, | |
| }, | |
| "17": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const Android = { | |
| "Samsung Galaxy A12": { | |
| "width": 720, | |
| "height": 1600 | |
| }, | |
| "Samsung Galaxy A13": { | |
| "width": 1080, | |
| "height": 2408 | |
| }, | |
| "Samsung Galaxy A13 5G": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Define the success/failure tuple types | |
| export type OperationSuccess<T> = readonly [data: T, error: null]; | |
| export type OperationFailure<E> = readonly [data: null, error: E]; | |
| export type OperationResult<T, E> = OperationSuccess<T> | OperationFailure<E>; | |
| // Define the allowed operation types | |
| /** | |
| * Checks if the value is a Promise or "Thenable" | |
| * @param value - The value to check | |
| * @returns True if the value is a Promise, false otherwise |