aboutsummaryrefslogtreecommitdiffstats
path: root/src/types.d.ts
blob: 157ed0b1a01f4cc66d07e742835e970d676b9cb8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
 * Copyright (c) 2016, Jeremy Stucki
 * Copyright (c) 2024 Kristóf Marussy
 *
 * SPDX-License-Identifier: MIT AND BSD-3-Clause
 *
 * Typings for `ResponsiveImageOutput` copied from
 * https://github.com/dazuaz/responsive-loader/blob/ef2c806fcd36f06f6be8a0b97e09f40c3d86d3ac/README.md
 */

interface ResponsiveImageOutput {
  src: string;
  srcSet: string;
  placeholder: string | undefined;
  images: { path: string; width: number; height: number }[];
  width: number;
  height: number;
  toString: () => string;
}

declare module '*&rl' {
  const src: ResponsiveImageOutput;
  export default src;
}

declare module '*?url' {
  const url: string;
  export default string;
}