Repository: expo/expo
File: packages/expo-image/src/Image.types.ts (TypeScript)

Code before:
   * A color used to tint template images (a bitmap image where only the opacity matters).
   * The color is applied to every non-transparent pixel, causing the image's shape to adopt that color.
   * This effect is not applied to placeholders.
   * @default null
   */
  tintColor?: string | null;

  /**
   * Priorities for completing loads. If more than one load is queued at a time,
   * the load with the higher priority will be started first.
   * Priorities are considered best effort, there are no guarantees about the order in which loads will start or finish.
   * @default 'normal'
   */
  priority?: 'low' | 'normal' | 'high' | null;

  /**
   * Sets the HTML `loading` attribute on the `<img>` element.
   * Has no effect on native platforms.
   *
   * - `'lazy'` - Defers loading until the image is near the viewport.
   * - `'eager'` - Loads the image immediately.
   *
   * @default undefined
   * @platform web
   */
  loading?: 'lazy' | 'eager' | null;

  /**
   * Determines whether to cache the image and where: on the disk, in the memory or both.
   *
   * - `'none'` - Image is not cached at all.
   *
   * - `'disk'` - Image is queried from the disk cache if exists, otherwise it's downloaded and then stored on the disk.
   *
   * - `'memory'` - Image is cached in memory. Might be useful when you render a high-resolution picture many times.
   * Memory cache may be purged very quickly to prevent high memory usage and the risk of out of memory exceptions.
   *
   * - `'memory-disk'` - Image is cached in memory, but with a fallback to the disk cache.
   *
   * @default 'disk'
   */
  cachePolicy?: 'none' | 'disk' | 'memory' | 'memory-disk' | /** @hidden */ null;

  /**
   * Controls the selection of the image source based on the container or viewport size on the web.
   *
   * If set to `'static'`, the browser selects the correct source based on user's viewport width. Works with static rendering.
   * Make sure to set the `'webMaxViewportWidth'` property on each source for best results.
   * For example, if an image occupies 1/3 of the screen width, set the `'webMaxViewportWidth'` to 3x the image width.
   * The source with the largest `'webMaxViewportWidth'` is used even for larger viewports.
   *

Review comment (suggestion):
If `eager` behavior is the default, we probably shouldn't accept `null`
```suggestion
  loading?: 'lazy' | 'eager';
```

Code after:
   * A color used to tint template images (a bitmap image where only the opacity matters).
   * The color is applied to every non-transparent pixel, causing the image's shape to adopt that color.
   * This effect is not applied to placeholders.
   * @default null
   */
  tintColor?: string | null;

  /**
   * Priorities for completing loads. If more than one load is queued at a time,
   * the load with the higher priority will be started first.
   * Priorities are considered best effort, there are no guarantees about the order in which loads will start or finish.
   * @default 'normal'
   */
  priority?: 'low' | 'normal' | 'high' | null;

  /**
   * Sets the HTML [`loading`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/img#loading) attribute on the `<img>` element.
   * Has no effect on native platforms.
   *
   * - `'lazy'` - Defers loading until the image is near the viewport.
   * - `'eager'` - Loads the image immediately.
   *
   * @default 'eager'
   * @platform web
   */
  loading?: 'lazy' | 'eager';

  /**
   * Determines whether to cache the image and where: on the disk, in the memory or both.
   *
   * - `'none'` - Image is not cached at all.
   *
   * - `'disk'` - Image is queried from the disk cache if exists, otherwise it's downloaded and then stored on the disk.
   *
   * - `'memory'` - Image is cached in memory. Might be useful when you render a high-resolution picture many times.
   * Memory cache may be purged very quickly to prevent high memory usage and the risk of out of memory exceptions.
   *
   * - `'memory-disk'` - Image is cached in memory, but with a fallback to the disk cache.
   *
   * @default 'disk'
   */
  cachePolicy?: 'none' | 'disk' | 'memory' | 'memory-disk' | /** @hidden */ null;

  /**
   * Controls the selection of the image source based on the container or viewport size on the web.
   *
   * If set to `'static'`, the browser selects the correct source based on user's viewport width. Works with static rendering.
   * Make sure to set the `'webMaxViewportWidth'` property on each source for best results.
   * For example, if an image occupies 1/3 of the screen width, set the `'webMaxViewportWidth'` to 3x the image width.
   * The source with the largest `'webMaxViewportWidth'` is used even for larger viewports.
   *