Skip to content

Commit 5f67aa3

Browse files
committed
Fix ts warnings
1 parent d99a480 commit 5f67aa3

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

src/ambient.d.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
declare module '*?as=run' {
2-
var img
3-
export default img
4-
}
5-
declare module '*&as=run' {
1+
declare module './assets/*' {
62
var img
73
export default img
84
}

src/lib/vite.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { imagetools, pictureFormat } from 'vite-imagetools'
22

33
function run(cfg) {
44
return async function (metadatas) {
5+
/** @type {any} */
56
const pic = pictureFormat()(metadatas)
67
const lqip = (cfg && parseInt(cfg)) ?? 16
78
if (lqip) {
@@ -25,7 +26,7 @@ function run(cfg) {
2526

2627
function main({
2728
profiles = {},
28-
// deprecated - to remove in next major
29+
/** @deprecated will be removed in next major */
2930
runDefaultDirectives = new URLSearchParams('w=480;1024;1920&format=avif;webp;jpg'),
3031
defaultDirectives = new URLSearchParams(),
3132
exclude = '{build,dist,node_modules}/**/*',

src/routes/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import i3 from './assets/1920/3.jpg?h=720&as=run'
77
import i4 from './assets/1920/4.jpg?h=720&as=run'
88
import i5 from './assets/1920/5.jpg?h=720&as=run'
99
import pllx from './assets/pllx.jpg?h=1024&as=run'
10-
import Img, { FxReveal, FxParallax } from '$lib'
10+
import Img, { FxReveal, FxParallax } from '$lib/index.js'
1111
import { version } from '$app/environment'
1212
import testSingle from './assets/640/01.jpg?w=80&h=80&format=jpg&as=run:0'
1313
import testFallback from './assets/640/01.jpg?h=80'

0 commit comments

Comments
 (0)