Skip to content

Commit

Permalink
Fix ts warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
zerodevx committed Aug 25, 2024
1 parent d99a480 commit 5f67aa3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
6 changes: 1 addition & 5 deletions src/ambient.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
declare module '*?as=run' {
var img
export default img
}
declare module '*&as=run' {
declare module './assets/*' {
var img
export default img
}
3 changes: 2 additions & 1 deletion src/lib/vite.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { imagetools, pictureFormat } from 'vite-imagetools'

function run(cfg) {
return async function (metadatas) {
/** @type {any} */
const pic = pictureFormat()(metadatas)
const lqip = (cfg && parseInt(cfg)) ?? 16
if (lqip) {
Expand All @@ -25,7 +26,7 @@ function run(cfg) {

function main({
profiles = {},
// deprecated - to remove in next major
/** @deprecated will be removed in next major */
runDefaultDirectives = new URLSearchParams('w=480;1024;1920&format=avif;webp;jpg'),
defaultDirectives = new URLSearchParams(),
exclude = '{build,dist,node_modules}/**/*',
Expand Down
2 changes: 1 addition & 1 deletion src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import i3 from './assets/1920/3.jpg?h=720&as=run'
import i4 from './assets/1920/4.jpg?h=720&as=run'
import i5 from './assets/1920/5.jpg?h=720&as=run'
import pllx from './assets/pllx.jpg?h=1024&as=run'
import Img, { FxReveal, FxParallax } from '$lib'
import Img, { FxReveal, FxParallax } from '$lib/index.js'
import { version } from '$app/environment'
import testSingle from './assets/640/01.jpg?w=80&h=80&format=jpg&as=run:0'
import testFallback from './assets/640/01.jpg?h=80'
Expand Down

0 comments on commit 5f67aa3

Please sign in to comment.